[GH-ISSUE #986] 无法为nginx-ui设置nginx代理 #6299

Closed
opened 2026-03-01 17:10:58 +03:00 by kerem · 3 comments
Owner

Originally created by @a421101046 on GitHub (Apr 24, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/986

具体现象:
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

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

Originally created by @a421101046 on GitHub (Apr 24, 2025). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/986 具体现象: 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](https://github.com/user-attachments/assets/8ff2b3c3-600c-498f-a3d0-ddaba5ec113a) 2.机器b ![Image](https://github.com/user-attachments/assets/cf3b857b-9a4f-4a2f-b104-b84803679f6b) 3.网页端报错信息 ![Image](https://github.com/user-attachments/assets/5a654d49-c070-4064-9e9b-79bf068e4d7b) 麻烦老师帮忙看看一下,谢谢
kerem 2026-03-01 17:10:58 +03:00
  • closed this issue
  • added the
    Q/A
    label
Author
Owner

@0xJacky commented on GitHub (Apr 24, 2025):

经典 proxy_pass 后面漏了个 /

<!-- gh-comment-id:2826242145 --> @0xJacky commented on GitHub (Apr 24, 2025): 经典 proxy_pass 后面漏了个 `/`
Author
Owner

@a421101046 commented on GitHub (Apr 24, 2025):

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

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

<!-- gh-comment-id:2826478004 --> @a421101046 commented on GitHub (Apr 24, 2025): 我补充了/,如 proxy_pass http://xxxxx:9001/ 。 浏览器端还是报重定向过多。 补充一下问题信息: 这个test.other实际是不存在的,浏览器端能访问是因为 本机的host文件里面配了 test.other 到机器b映射。
Author
Owner

@0xJacky commented on GitHub (Apr 24, 2025):

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

<!-- gh-comment-id:2826571415 --> @0xJacky commented on GitHub (Apr 24, 2025): 把 location = / 那一个block 也删掉,然后 reload nginx
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#6299
No description provided.