Nginx代理传递不使用SSL

问题描述 投票:0回答:1

目前我在ESXi上运行了3个虚拟机,其中nginx正在控制请求。一个运行apache web服务器的网站是第一个例子。最后一个是运行nextcloud虽然snap是ssl加密的,当我尝试通过nginx运行它时给我错误。如何使用ssl通过nginx运行它?

这是通过nginx工作的网站

    server {
    listen 80;
    server_name URL URL2;
    location / {
            proxy_pass http://192.168.1.7;
            proxy_set_header host  URL;
    }
    }

这是与ssl不兼容的

    server {
    listen 80;
    listen 443 ssl;
    server_name URL3;
    location / {
            proxy_pass https://192.168.1.17;
            proxy_set_header host URL3;
    }
    }

这是错误

Secure Connection Failed
The connection to dynanixcloud.ddns.net was interrupted while the page was loading.
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
ssl nginx virtual-machine reverse-proxy nextcloud
1个回答
0
投票

根据您显示的配置,我找不到SSL参数。因为你正在显示听443 ssl;那么你必须提供SSL指令来支持上述参数。像下面的东西

服务器{

listen              443 ssl;
server_name         www.example.com;
ssl_certificate     www.example.com.crt;
ssl_certificate_key www.example.com.key;
ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers         HIGH:!aNULL:!MD5;
...

}

© www.soinside.com 2019 - 2024. All rights reserved.