flyzy博客
分享便宜VPS与网络优惠
搬瓦工

nginx反代哪吒面板显示实施通道断开

反代代码
#PROXY-START/
location  ~* \.(php|jsp|cgi|asp|aspx)$
{
    proxy_pass http://127.0.0.1:8085;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
}
location /
{
    proxy_pass http://127.0.0.1:18080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
   
    #add_header X-Cache $upstream_cache_status;
   
    #Set Nginx Cache
   
    add_header Cache-Control no-cache;
    expires 12h;
}
location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
   {
    proxy_pass http://127.0.0.1:18080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
        expires 12h;
    }
location ~ .*.(js|css)$
   {
    proxy_pass http://127.0.0.1:18080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
        expires 12h;
    }
#PROXY-END/
麻烦大佬们指点

黑龙江省网友说:反向代理,配置文件编辑:

location /
{
    proxy_pass http://127.0.0.1:18080;
    proxy_set_header Host $host;
}
location /ws
{
    proxy_pass http://127.0.0.1:18080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection “Upgrade”;
    proxy_set_header Host $host;
}

陕西省网友说:http://nginx.org/en/docs/http/websocket.html
nginx官方回答

辽宁省网友说:感谢

赞(0) 打赏
关注我们
未经允许不得转载:flyzy博客 » nginx反代哪吒面板显示实施通道断开
分享到: 更多 (0)

这是一种鼓励

支付宝扫一扫打赏

微信扫一扫打赏