nginx代理独立前端项目静态资源404

1.根目录(/)访问

a.使用server_name,配置多域名
b.使用端口

2.非根目录(/path/index.html)

server {
        listen       80;
        server_name  _;
        location /path/{
            proxy_pass http://targetIp:targetPort/path/;
        }
}
posted @ 2021-08-25 11:45  doite  阅读(584)  评论(0)    收藏  举报