#修改ngnix.conf文件添加以下内容
vim /usr/local/ngnix/conf/ngnix.conf
upstream backend {
server 192.168.31.167:8081;
server 192.168.31.68:8080;
#server 192.168.31.68:8080 weight=1 max_fails=1 fail_timeout=10s;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
# location / {
# proxy_pass http://backend;
# root html;
# index index.html index.htm;
# }
location /mis/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_send_timeout 310s;
proxy_read_timeout 310s;
proxy_pass http://backend/mis/;
}