各位大佬,昨天配置了一个 CHATGPT WEB 项目玩了玩,本地 http://localhost:8855 可以正常使用,于是想配合 nginx 反代出来,让自己在外面也能用一下。但是 nginx 一直报 502 错误。具体报错内容是 chatgpt 项目是 https://github.com/CODEisArrrt/chatgpt-dark
[error] 1019768#1019768: *9 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 39.xx.xx.xxx, server: aaa.bbb.com, request: "GET / HTTP/1.1", upstream: "https://192.168.50.49:8855/", host: "aaa.bbb.com:6053"
Nginx 的 conf 字段如下
server { listen 6053 ssl http2; server_name aaa.bbb.com;
ssl_certificate /etc/nginx/cert/nginx-crt.pem;
ssl_certificate_key /etc/nginx/cert/nginx-key.pem;
client_max_body_size 1024m;
index index.html;
error_log /var/log/nginx/error-chatgpt.log error;
location / {
proxy_pass https://192.168.50.49:8855;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 43200000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_buffering off;
}
}
同样的 conf 内容,Nginx 的其他 web 服务都正常。证书是 acme.sh 做的自签证书且在有效期内
检索过相关网页,但是都没有太多作用,尝试过删除 http2 但是没有作用
请问我这个报错该如何 debug
1
fiveStarLaoliang 2023-03-21 09:57:51 +08:00
你把 https 换成 http, 192.168.50.49 没有证书, 何必用 https
|
2
xiaoyuesanshui OP @fiveStarLaoliang 多谢多谢,我这个地方忘记改了
|