配置反向代理,解决静态资源无法访问问题
server {
listen 80;
server_name www.xxxx.com;
charset utf-8;
#access_log logs/host.access.log main;
location / {
proxy_pass http://localhost:8888;
}
# 解决js css 访问不到的问题
location ~ .* {
proxy_pass http://localhost:8888;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forw $proxy_add_x_forwarded_for;
}
}