然后Nginx前面apache

我只有自己的networking运行(httphttps与apache2),但现在我想主办另一个网站。 https没有警告地工作“你的连接不安全”

所以为此,我已经安装了另一台服务器与nginx我想要设置我的STAR_mydomain_com.crt和_mydomain_com.key我在apache2上使用SSL。

server { listen 443; server_name cloud.mydomain.com; error_log /var/log/nginx/cloud.access.log; ssl on; ssl_certificate /etc/nginx/ssl/STAR_mydomain_com.crt; ssl_certificate_key /etc/nginx/ssl/_mydomain_com.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # dont use SSLv3 ref: POODLE location / { proxy_pass http://192.168.1.10/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; proxy_set_header X-Forward-Proto http; proxy_set_header X-Nginx-Proxy true; proxy_redirect off; }} 

但是现在我得到这样的信息:“你的连接不安全”

我不明白为什么

任何解释为什么?

您可能忘记在ssl_certificates文件中添加中间证书。 在Apache中有一个单独的中间证书选项,而在nginx中没有。 相反,您必须将所有中间证书放在您的ssl_certificates文件中,正好位于您自己的证书之后。 (见1 )


原帖:

当你切换到nginx时更改服务器名称?

证书只对某个DNS名称有效。

通常在“你的连接不安全”的对话框中有更多的信息,比如“证书只对xzy.mydomain.com有效”,这些信息可以帮助我们解决你的问题。