创建nginx二级代理
location / {
root "D:/xxx/html";
#root html;
index index.html index.htm;
}
location /digibird { // html文件中index.html 包含 window.location.href='digibird' 导航
alias "D:/xxx/html/digibird"; # 真正的工作目录
# alias "html/digibird";
index index.html index.htm;
try_files $uri $uri/ /digibird/index.html;
}
location /prod-api/{
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8008/;
}
location /xxxsocket {
proxy_pass http://localhost:8708/websocket/yyyyy;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 45;
proxy_send_timeout 600;
proxy_read_timeout 600;
}