WordPress、 Varnish 、 Apache 、SSL

标签 wordpress apache ssl varnish

我已经安装了 wordpress 并设置了 SSL (LetsEncrypt)。 几个月以来它工作正常。 现在我想添加 Varnish 来加速网站,但我遇到了一个问题。 我的配置是: MyPage.com (443) -> Varnish (80) -> MyPage (8080) 无 https。 当我打开页面时,一切正常 除了指向静态文件的地址。 所有指向 CSS、JS、图像的 URL 都作为 HTTP 而不是 HTTPS 提供。 那是因为最终页面由没有 SSL 的 Apache 提供。 你知道如何将地址更改为静态文件,它们将作为 HTTPS(https://MyPage.com/my.js 而不是 http://MyPage.com/my.js)?

最佳答案

Wordpress 将链接绝对保存在数据库中。 解决方案 1: 您编辑数据库中的所有条目 解决方案 2: 简单使用此插件将数据库中的所有 url 从 http 写入 https:

https://de.wordpress.org/plugins/really-simple-ssl/

关于WordPress、 Varnish 、 Apache 、SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51998779/

相关文章:

ssl - 为 Hyperledger Fabric couchdb 启用 SSL

wordpress - 评论审核获得批准后生成 WooCommerce 优惠券

wordpress - Dart Flutter - 使用 Chopper 获取 WordPress 自定义帖子类型

apache - 引用:mod_rewrite,URL重写和“漂亮的链接”解释

apache - 如何通过 https 使用 Vagrant & Puppet

xml - 通过 HTTPS 为 REST 服务构建什么样的脚本/应用程序

php - 如何在 PHP CURL 中使用 ECDHE 密码?

php - Wordpress get_template_directory_uri() 和 bloginfo ('template_directory' ) 使用 HTTPS 返回不同的结果

wordpress - 谷歌云sftp的权限

java - 如何解决 : javax. servlet.ServletException : java. lang.NoClassDefFoundError: javax/xml/ws/soap/SOAPFaultException