修改nginx配置文件如下(在location中添加:proxy_set_header x-forwarded-for $remote_addr;)
server {
listen 80;
server_name www.zhangshan.top;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_set_header x-forwarded-for $remote_addr;
proxy_pass http://localhost:8084;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}