Jrohy / trojan

trojan多用户管理部署程序, 支持web页面管理
GNU General Public License v3.0
5.42k stars 1.51k forks source link

修改了web后台端口,80端口网站正常,admin后台带端口和/目录两种方式都登陆不了了。 #370

Closed totodata closed 2 years ago

totodata commented 3 years ago

修改了web后台端口,80端口网站正常, admin后台带端口和/目录两种方式都登陆不了了。 也没有任何报错,之前一切正常的。 trojan也正常访问。

Jrohy commented 3 years ago

换个端口试试

totodata commented 3 years ago

尝试换过几个端口,都不行,怎么排查错误呢。

totodata commented 3 years ago

火狐报错: 建立安全连接失败

连接到 时发生错误。SSL 接收到一个超出最大准许长度的记录。

错误代码:SSL_ERROR_RX_RECORD_TOO_LONG

Jrohy commented 3 years ago

systemctl status trojan-web看看状态有没有启动成功

totodata commented 3 years ago

成功的,个人感觉,是ssl证书问题? 因为以前都很正常,是突然间不行的。

totodata commented 3 years ago

[root@VM-4-9-centos ~]# systemctl status trojan-web ● trojan-web.service - trojan-web Loaded: loaded (/etc/systemd/system/trojan-web.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2021-01-20 15:27:35 CST; 14min ago Docs: https://github.com/Jrohy/trojan Main PID: 4025 (trojan) Tasks: 5 Memory: 15.5M CGroup: /system.slice/trojan-web.service └─4025 /usr/local/bin/trojan web -p 81

Jrohy commented 3 years ago

trojan能用的ssl应该就没问题

totodata commented 3 years ago

我找到原因了,就是访问web后台的时候,不能带上https,没注意看,直接打上去了。

totodata commented 3 years ago
location ~* ^/(js|css|vendor|common|auth|trojan)/ {
    proxy_pass  http://localhost:81;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
}

nginx配置中, 上面这段删掉,重启,再加上去,重启,就正常了。