Permalink
Switch branches/tags
Nothing to show
Find file Copy path
cda476d Dec 26, 2016
1 contributor

Users who have contributed to this file

44 lines (34 sloc) 902 Bytes
#Use this example for proxy traffic to the document server running at 'backendserver-address'.
upstream docservice {
server backendserver-address;
}
map $http_host $this_host {
"" $host;
default $http_host;
}
map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
"" $scheme;
}
map $http_x_forwarded_host $the_host {
default $http_x_forwarded_host;
"" $this_host;
}
map $http_upgrade $proxy_connection {
default upgrade;
"" close;
}
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
server {
listen 0.0.0.0:80;
listen [::]:80 default_server;
server_tokens off;
location / {
proxy_pass http://docservice;
proxy_http_version 1.1;
}
}