VPS侦探论坛

 找回密码
 注册
查看: 2486|回复: 2

关于WP站点负载均衡的https配置

[复制链接]
发表于 2019-5-14 22:38:03 | 显示全部楼层 |阅读模式

本帖最后由 Tearth 于 2019-5-14 22:47 编辑

请教一下关于wordpress负载均衡后HTTPS的配置。这里配置了两个后端服务器,代理服务器server_name为wp.com。配置好,重启nginx,在浏览器访问wp.com,HTTP完全正常;使用HTTPS访问的时候会出现 Mixed Content 这样的错误。网上已经查过资料了,没有适用的教程。麻烦问下这里应该怎么配置
配置文件如下:
  1. upstream blog {
复制代码
  1. (index):14 Mixed Content: The page at 'https://wp.com/' was loaded over HTTPS, but requested an insecure script 'http://wp.com/wp-includes/js/wp-emoji-release.min.js?ver=5.0.3'. This request has been blocked; the content must be served over HTTPS.
  2. f @ (index):14
  3. (anonymous) @ (index):14
  4. (anonymous) @ (index):14
  5. (index):30 Mixed Content: The page at 'https://wp.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://wp.com/wp-includes/css/dist/block-library/style.min.css?ver=5.0.3'. This request has been blocked; the content must be served over HTTPS.
  6. (index):31 Mixed Content: The page at 'https://wp.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://wp.com/wp-includes/css/dist/block-library/theme.min.css?ver=5.0.3'. This request has been blocked; the content must be served over HTTPS.
  7. (index):32 Mixed Content: The page at 'https://wp.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://wp.com/wp-content/themes/twentynineteen/style.css?ver=1.2'. This request has been blocked; the content must be served over HTTPS.
  8. (index):33 Mixed Content: The page at 'https://wp.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://wp.com/wp-content/themes/twentynineteen/print.css?ver=1.2'. This request has been blocked; the content must be served over HTTPS.
  9. (index):89 Mixed Content: The page at 'https://wp.com/' was loaded over a secure connection, but contains a form that targets an insecure endpoint 'http://wp.com/'. This endpoint should be made available over a secure connection.
  10. (index):1 Mixed Content: The page at 'https://wp.com/' was loaded over HTTPS, but requested an insecure script 'http://wp.com/wp-includes/js/wp-embed.min.js?ver=5.0.3'. This request has been blocked; the content must be served over HTTPS.
复制代码




美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2019-5-14 22:56:48 | 显示全部楼层


配置文件粘不进去,附截图一张。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2019-5-15 09:23:33 | 显示全部楼层

可能wp后台上没将网站url改成https的或者你wp的模版里css、js等静态资源都是直接用http写死的链接
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-22 19:28 , Processed in 0.027341 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表