【问题标题】:Your connection is not private (nginx, bluehost, google cloud and cloudflare)您的连接不是私有的(nginx、bluehost、google cloud 和 cloudflare)
【发布时间】:2019-07-21 10:47:18
【问题描述】:

我在 Debian 上使用 Nginx 在谷歌云的计算引擎中托管一个站点,我使用 Bluehost 域和 Cloudflare SSL。
我的网站有时有效,有时无效,并向我显示以下消息:您的连接不是私密的。
解决办法是什么?

example.com 文件:

服务器 { 听 80; 听 [::]:80; server_name example.com www.example.com; 返回 302 https://$server_name$request_uri; } 服务器 { #SSL 配置 听 443 ssl http2; 听 [::]:443 ssl http2; 开启ssl; ssl_certificate /etc/ssl/certs/cert.pem; ssl_certificate_key /etc/ssl/private/key.pem; server_name example.com www.example.com; 根 /var/www/example.com/html; 索引 index.html index.htm index.php; ssl_client_certificate /etc/ssl/certs/cloudflare.crt; ssl_verify_client 开启; 地点 / { try_files $uri $uri/ =404; } 位置 ~ \.php$ { 包括 sn-ps/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; } }

【问题讨论】:

  • 这很可能是由于使用了 HTTP:// 端点,或者您在 HTML 中引用了使用 HTTP:// 的资源。确保一切都使用 HTTPS。在浏览器中启用调试器并查看网络选项卡。

标签: nginx debian ssl-certificate google-compute-engine cloudflare


【解决方案1】:

我认为 John H 成功了,看来您遇到了混合内容问题。您可能最终不得不按照建议进行编辑,但我首先建议您尝试在“加密”选项卡上启用“自动 HTTPS 重写”。其他混合内容建议在这里,https://community.cloudflare.com/t/community-tip-fixing-mixed-content-errors/42476

如果您对 Cloudflare 有更多疑问,请访问 Cloudflare 社区,https://community.cloudflare.com/t/community-tip-welcome-stackoverflow-visitors/99529。”

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-05-23
    • 2019-03-23
    • 2022-06-10
    • 2017-10-19
    • 2018-07-03
    • 2017-10-15
    • 2022-08-19
    • 2015-04-01
    相关资源
    最近更新 更多