Skip to content

无法为nginx-ui设置nginx代理 #986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
a421101046 opened this issue Apr 24, 2025 · 3 comments
Closed

无法为nginx-ui设置nginx代理 #986

a421101046 opened this issue Apr 24, 2025 · 3 comments
Labels

Comments

@a421101046
Copy link

具体现象:
1.机器A 部署nginx、nginx-ui(nginx-ui会暴露9001),网页端访问机器A的9001端口可正常使用 nginx-ui
2.机器B部署nginx 暴露8001端口 代理 nginx-ui的流量,此时通过网页端访问机器B的ip:8001 或者 域名:8001,网页端会提示重定向过多。

具体配置如下:
1.机器A的nginx-ui配置文件
Image

2.机器b

Image

3.网页端报错信息
Image

麻烦老师帮忙看看一下,谢谢

@a421101046 a421101046 added the bug Something isn't working label Apr 24, 2025
@0xJacky
Copy link
Owner

0xJacky commented Apr 24, 2025

经典 proxy_pass 后面漏了个 /

@0xJacky 0xJacky added Q/A and removed bug Something isn't working labels Apr 24, 2025
@0xJacky 0xJacky closed this as completed Apr 24, 2025
@a421101046
Copy link
Author

我补充了/,如 proxy_pass http://xxxxx:9001/ 。 浏览器端还是报重定向过多。

补充一下问题信息: 这个test.other实际是不存在的,浏览器端能访问是因为 本机的host文件里面配了 test.other 到机器b映射。

@0xJacky
Copy link
Owner

0xJacky commented Apr 24, 2025

把 location = / 那一个block 也删掉,然后 reload nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants