nginx - 您的连接不是私有的(nginx、bluehost、google cloud 和 cloudflare)
问题描述
我在 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$ { 包括片段/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; } }
解决方案
我认为 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 。”
推荐阅读
- azure - json.Marshal(): json: 为 msgraph.Application 类型调用 MarshalJSON 时出错
- javascript - 如何遍历选定元素并将样式应用于每个元素?
- ruby - 如何检查 selenium 是否在 Ruby 上的浏览器上工作
- oracle - 为什么我运行脚本时输出为空白
- ios - 如何在不覆盖 UITabBarItem.appearance() 的情况下设置 UITabBarAppearance()?
- python - 如何在不使用 Driver.get 的情况下使用 Selenium 单击元素?
- apache-spark - 你如何在 pyspark 中为 RDD 过滤一个 EXACT 词?
- java - NetBeans 历史记录未显示
- php - PHP - 根据用户回答形成问题群体
- javascript - 模块构建失败(来自 ./node_modules/@nuxt/webpack/node_modules/babel-loader/lib/index.js):