我的Nginx代理管理器和HTTPS有问题。我的Nginx代理经理在码头上运行。并且我的PiHole用一个自定义的dns记录重定向我的域(sub.domain.de)到我的服务器(在端口80上),其中Nginx正在运行。代理管理器被配置为使用我想要连接的坞容器的端口(对于exaple 192.168.178.35:6595)。
我知道这个错误:
2022/01/09 11:43:57 [error] 1636#1636: *21857 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 172.17.0.1, server: sub.domain.de, request: "GET / HTTP/2.0", upstream: "https://192.168.178.35:6595/", host: "sub.domain.de"我的域有一个有效的“让我们加密”证书,但前提是我将代理管理器设置为http并强制ssl。但是如果我说https,它会给我错误的"502坏网关“。对于Https,我的意思是:

下面是我的Nginx代理Manger配置,用于此域示例。
# ------------------------------------------------------------
# sub.domain.de
# ------------------------------------------------------------
server {
set $forward_scheme https;
set $server "192.168.178.35";
set $port 6595;
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name sub.domain.de;
# Let's Encrypt SSL
include conf.d/include/letsencrypt-acme-challenge.conf;
include conf.d/include/ssl-ciphers.conf;
ssl_certificate /etc/letsencrypt/live/npm-10/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/npm-10/privkey.pem;
access_log /data/logs/proxy-host-19_access.log proxy;
error_log /data/logs/proxy-host-19_error.log warn;
location / {
# Proxy!
include conf.d/include/proxy.conf;
}
# Custom
include /data/nginx/custom/server_proxy[.]conf;
}发布于 2022-08-31 14:49:18
要在Nginx代理管理器中使用HTTPS,只需在SSL选项卡中选择证书即可。Details选项卡中的Scheme选项(您已经设置为https )必须是http,因为您转发到的主机(192.168.178.35:6595)没有SSL证书。证书只在代理上。
https://stackoverflow.com/questions/70640901
复制相似问题