#文档预览office服务地址
upstream office {
#weigth参数表示权值,权值越高被分配到的几率越大
server 192.168.x.xxx:8289 weight=1;
}
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;
"" $host;
}
map $http_upgrade $proxy_connection {
default upgrade;
"" close;
}
server {
listen [::]:80;
listen 80;
server_name localhost;
......省略正常配置部分.......
location /office/ {
proxy_pass http://office/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host/office;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
01-13
2362
03-29
2307
03-06
1713
09-07
2405