具有自定义端口配置的Nginx SSL失败

时间:2020-03-03 18:20:52

标签: nginx nginx-reverse-proxy nginx-config

我具有以下nginx配置

server {
    listen 4050;
    listen 443 ssl;

    server_name url ww.url;

    location / {
     proxy_pass http://localhost:6091;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "upgrade";
     proxy_http_version 1.1;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header Host $host;
    }



   ssl_certificate /etc/letsencrypt/live/domain/fullchain.pem; # managed by Certbot
   ssl_certificate_key /etc/letsencrypt/live/domain/privkey.pem; # managed by Certbot
   include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
   ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

以上操作在访问http://domain:4050之后的http上有效,但是当我通过https://domain:4050通过https访问https时失败了

要在端口4050上与https一起使用,我缺少什么?

1 个答案:

答案 0 :(得分:1)

要使其与https一起使用,您需要将NuovoSheet.AutoFilterMode = False 更改为NuovoWorkbook.Close False 。但是,那么您将无法在http中使用它。

HTTP和HTTPS不能使用相同的端口