各种方式都试了,效果一模一样,不知道是哪里没有设置对,求助各位大佬!!!!
网页加载不全,图片不显示,进后台一直转圈……就加了以下配置
upstream halo {
server 127.0.0.1:8090;
}
location / {
proxy_pass http://127.0.0.1:8090/;
rewrite ^/(.)$ /$1 break;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade-Insecure-Requests 1;
proxy_set_header X-Forwarded-Proto https;
}
location ~ ..(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$
{
proxy_pass http://halo;
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$
{
proxy_pass http://halo;
expires 7d;
access_log off;
}