MENU

HestiaCP Web Terminal Connection error错误

2025 年 05 月 14 日 • 阅读: 222 • 技术

前端发现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(推荐)

最后编辑于: 2025 年 05 月 26 日
返回文章列表 打赏
本页链接的二维码
打赏二维码