-
Notifications
You must be signed in to change notification settings - Fork 844
Open
Description
使用nginx对ui前端以及clash的api都进行反向代理即可。然后通过二级域名进行https。
配置如下. 注意 /的使用很重要.
location ^~ /api/ {
proxy_pass http://127.0.0.1:9090/;
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 Cache-Control no-cache;
}location ^~ / {
proxy_pass http://127.0.0.1:9090/ui/;
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 Cache-Control no-cache;
}然后在ui里输入https://你的外网IP/api, 填入密码(如果有)就可以了
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels