Closed seepine closed 9 months ago
使用域名解析,直接访问域名不加任何路径,会莫名代理到Portainer的9000端口
version: '3' services: server: image: yisier1/nps ports: - 18080:8080 - 10080:80 - 18024:8024
a.com 转发到一台内网服务器 192.168.3.10:9000
server { listen 80; listen 443 ssl http2; server_name a.com; index index.php index.html index.htm default.php default.htm default.html; location / { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:10080/; if ($request_method = 'OPTIONS') { return 204; } } }
https://a.com/#!/auth
curl https://a.com
https://a.com
例如 https://a.com/x 或 https://a.com/login ,才能成功转发到内网应用上,出现404或对应页面
Expected behavior A clear and concise description of what you expected to happen.
Screenshots or logs
Server (please complete the following information):
Client (please complete the following information):
貌似和个数或时间有关系?我一开始添加的早上添加了两个,没有这个问题,后面加到了五个,下午再访问就出现这个情况
Describe the bug
使用域名解析,直接访问域名不加任何路径,会莫名代理到Portainer的9000端口
To Reproduce
云服务器通过docker部署最新版本nps
进入管理后台配置域名解析
a.com 转发到一台内网服务器 192.168.3.10:9000
云服务器nginx配置转发
错误情况:直接访问域名 https://a.com
https://a.com/#!/auth
curl https://a.com
也一样是portainer页面https://a.com
会出现502,不会再出现portainer,因此问题应该出在nps这边预期情况:当访问域名+路径
例如 https://a.com/x 或 https://a.com/login ,才能成功转发到内网应用上,出现404或对应页面
Expected behavior A clear and concise description of what you expected to happen.
Screenshots or logs![image](https://github.com/yisier/nps/assets/93666053/2614956d-939e-44bb-9b6b-c18bbe4dd60a)
Server (please complete the following information):
Client (please complete the following information):