upstream webman {
server 127.0.0.1:8787;
keepalive 10240;
}
server {
server_name 站点域名;
listen 80;
access_log off;
root /your/webman/public;
location ^~ / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host; 【这个地方应该用 $http_host,不然当你nginx里设置了其他端口的时候是获取不到的
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
if (!-f $request_filename){
proxy_pass http://webman;
}
}
}
感谢反馈