0

目前,我有 3 台虚拟机在 ESXi 上运行,其中一台使用 nginx 控制请求。一个运行 apache Web 服务器的网站是第一个示例。最后一个是通过 ssl 加密的 snap 运行 nextcloud,当我尝试通过 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.
4

1 回答 1

0

根据您显示的配置,我找不到 SSL 参数。因为您正在显示listen 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;
...

}

于 2017-12-25T07:33:29.283 回答