Tearth 发表于 2019-5-14 22:38:03

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

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

请教一下关于wordpress负载均衡后HTTPS的配置。这里配置了两个后端服务器,代理服务器server_name为wp.com。配置好,重启nginx,在浏览器访问wp.com,HTTP完全正常;使用HTTPS访问的时候会出现 Mixed Content 这样的错误。网上已经查过资料了,没有适用的教程。麻烦问下这里应该怎么配置
配置文件如下:
upstream blog {(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.
f @ (index):14
(anonymous) @ (index):14
(anonymous) @ (index):14
(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.
(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.
(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.
(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.
(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.
(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.



Tearth 发表于 2019-5-14 22:56:48

配置文件粘不进去,附截图一张。
https://i.loli.net/2019/05/14/5cdad71acd42e15511.png

licess 发表于 2019-5-15 09:23:33

可能wp后台上没将网站url改成https的或者你wp的模版里css、js等静态资源都是直接用http写死的链接
页: [1]
查看完整版本: 关于WP站点负载均衡的https配置