Skip to content
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

新增的 login 页面不支持二级目录的反代 #1137

Open
yfdoor opened this issue Jun 1, 2024 · 2 comments
Open

新增的 login 页面不支持二级目录的反代 #1137

yfdoor opened this issue Jun 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@yfdoor
Copy link

yfdoor commented Jun 1, 2024

问题描述

之前是可以通过 http://1235.com/ddns 这样来反代二级目录的,现在新增的 login 页面不会定位到 http://1235.com/ddns/login 下,而是 http://1235.com/login。导致页面显示出错。

DNS服务商

No response

是否已搜索同类问题

已搜索,但未能解决

操作系统

Linux

架构

x86_64

版本

v6.6

安装方式

Docker

额外信息

No response

@yfdoor yfdoor added the bug Something isn't working label Jun 1, 2024
@WaterLemons2k
Copy link
Contributor

#1129

@yfdoor
Copy link
Author

yfdoor commented Jun 2, 2024

#1129

按照上面的案例添加 rewrite

location ^~ /ddns/ {
    proxy_pass http://127.0.0.1:9876/; 
    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; 
    proxy_set_header Upgrade $http_upgrade; 
    proxy_set_header Connection "upgrade"; 
    proxy_set_header X-Forwarded-Proto $scheme; 
    proxy_http_version 1.1; 
    add_header X-Cache $upstream_cache_status; 
    add_header Strict-Transport-Security "max-age=31536000"; 
    add_header Cache-Control no-cache; 
    rewrite /ddns/(.*) /$1 break;
}

还是跳转到 http://1235.com/login 页。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants