前端发现https://hostname:8083/_shell/
被302重定向到 http://localhost:8083
了
查看配置文件/usr/local/hestia/nginx/conf/nginx.conf
location /_shell/ {
proxy_pass http://localhost:8083;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
#the Host is missing
}
将其改为(FIX):
location /_shell/ {
proxy_pass http://localhost:8085; #Change the port
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host; #Add this line
}
1. 其中更改反代端口(可在`/usr/local/hestia/conf/hestia.conf`中找到`WEB_TERMINAL_PORT`)
2. 添加`proxy_set_header Host $host;`
之后重载nginx或者重启reboot
(推荐)