全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 821|回复: 3

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

[复制链接]
发表于 2021-1-28 13:32:06 | 显示全部楼层 |阅读模式
反代代码
#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/
麻烦大佬们指点
发表于 2021-1-28 13:39:37 | 显示全部楼层
反向代理,配置文件编辑:

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;
}
发表于 2021-1-28 13:42:48 | 显示全部楼层
http://nginx.org/en/docs/http/websocket.html
nginx官方回答
 楼主| 发表于 2021-1-28 13:43:48 | 显示全部楼层
主菜单 发表于 2021-1-28 13:39
反向代理,配置文件编辑:

location /

感谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-19 14:00 , Processed in 0.080450 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表