-
Notifications
You must be signed in to change notification settings - Fork 408
/
nginx.conf
44 lines (40 loc) · 1.57 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
upstream geoserver {
server geoserver:8080;
}
server {
listen 80;
# the domain name it will serve for
server_name localhost;
# max upload size, adjust to taste
keepalive_timeout 500;
proxy_connect_timeout 600;
proxy_send_timeout 600;
send_timeout 600;
client_max_body_size 5000;
client_header_timeout 600;
client_body_timeout 600;
fastcgi_read_timeout 300;
location / {
proxy_pass http://geoserver/;
proxy_set_header Host $host; # the host requested by the client
proxy_set_header X-Real-IP $remote_addr; # the real visitor IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # the client IP
proxy_set_header X-Forwarded-Host $host:$server_port; # the host used for the request
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; # the scheme used for the request, http or https
port_in_redirect off;
proxy_connect_timeout 600;
}
location /geoserver {
proxy_pass http://geoserver/geoserver;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
port_in_redirect off;
proxy_connect_timeout 600;
proxy_set_header X-Script-Name /geoserver;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}