【问题标题】:Nginx proxy pass not working with SSLNginx 代理通行证不适用于 SSL
【发布时间】:2018-06-05 23:05:42
【问题描述】:

目前我有 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.

【问题讨论】:

标签: ssl nginx virtual-machine reverse-proxy nextcloud


【解决方案1】:

根据您显示的配置,我找不到 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;
...

}

【讨论】:

  • 是否有关于 ssl 设置的文档?
  • 您好,假设您拥有公共 CA 证书并且有两个文件,其中包含私钥和证书文件,其中包含由提供的服务器和中间证书加利福尼亚州。
猜你喜欢
  • 1970-01-01
  • 2020-11-22
  • 1970-01-01
  • 2017-09-27
  • 2019-12-28
  • 1970-01-01
  • 1970-01-01
  • 2014-12-04
  • 1970-01-01
相关资源
最近更新 更多