配置反向代理nginx代理
(Nginx)3.点击左侧网站目录,点击域名进入站点配置,修改配置文件,在最后一个大括号上面增加以下代码,如果修改了端口,请对应修改代码,添加完成后保存
location /notice {
proxy_pass http://127.0.0.1:50001/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /msg {
proxy_pass http://127.0.0.1:50002/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}
按上面教程配置,出现下图报错,
这个怎么弄?