- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一个通过 SSL 服务的站点,该站点位于我管理的服务器上。我还使用 WPEngine 来提供我的博客(因为我不想自己运行 WordPress 安装)。该博客页面当前在没有 HTTPS 的情况下提供服务。
为了让我的所有 URL 都显示在我的顶级域中,我使用 Varnish 将对 mytoplevelsite.com/blog
的请求代理到我的 WPEngine 安装。
如果 WPEngine 上没有 SSL 证书,这一切都很好。然而,当我试图让它与 SSL 一起工作时,我得到了一个 301 重定向循环。
我的 vcl
看起来像这样:
backend default {
.host = "127.0.0.1";
.port = "8080"; # apache is listening here
}
backend blog {
.host = "wpengine-ip-address";
.port = "80";
}
sub vcl_recv {
if (req.url ~ "^/blog" && req.http.Host ~ "(.*)mytoplevelsite.com") {
set req.backend = blog;
if ((req.url ~ "^/blog/wp-content") || (req.url ~ "^/blog/wp-includes")) {
set req.http.host = "mysite.wpengine.com";
set req.url = regsub(req.url, "^/blog", "");
}
return(pass);
}
}
在 WPEngine 中,我安装了 SSL 并将 mytoplevelsite.com/blog
设置为通过 HTTPS 提供服务,但这会导致 301 重定向循环。当我运行:curl -Li https://mytoplevelsite.com/blog
我一遍又一遍地看到这个:
HTTP/1.1 301 Moved Permanently
Date: Thu, 23 Jun 2016 13:26:07 GMT
Server: Apache
Location: http://mytoplevelsite.com/blog/
Content-Length: 311
Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 301 Moved Permanently
Server: nginx
Content-Type: text/html
Location: https://mytoplevelsite.com/blog/
X-Type: default
Content-Length: 178
Accept-Ranges: bytes
Date: Thu, 23 Jun 2016 13:26:07 GMT
X-Varnish: 1087407254
Age: 0
Via: 1.1 varnish
Connection: keep-alive
... repeat until timeout
关于我可以在这里做什么的任何想法?
最佳答案
如果您有共享 SSL(我假设是通配符),请使用 sFTP 将 key 和证书文件上传到您的 _wpeprivate
文件夹,然后获得他们的支持,将证书的副本放在他们的服务器上。(这是托管在不同服务器上的任何子域站点的正确方法。)
通过 my.wpengine.com 用户门户强制使用 SSL。 Overview > SSL > 单击 SSL 并强制全部为 SSL
以上述推荐方法以外的任何其他方式强制使用 SSL 通常会导致重定向循环。
关于wordpress - 使用 Varnish 代理 WordPress(在 WPEngine 上),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37993797/
由于某些奇怪的原因,当我推送到 wpengine 时,我的文件可以毫无问题地更新——但它不会只删除我的主题文件夹中的文件。 以下是正在发生的事情的列表: 删除主题文件没有问题,主题将被删除。但是,如果
我们使用 Wpengine 设置了暂存站点,自 Wordpress 4.0 更新以来,所有需要 SSL 的页面都拒绝连接。 Chrome 错误: Your connection is not priv
我继承了一个 Wordpress 项目,我正在尝试设置它。我对 Wordpress 的经验为零,也可以说我对 PHP 的经验为零。到目前为止,我已经设法在我的本地机器上设置了环境,但是我遇到了一个 P
我在 bigcommerce(正式的 interspire)中包含了一个 PHP 文件。 PHP 文件来自 wpengine 站点。包含该文件如下所示: %%Include.http://www.se
我们在 WPEngine 上有一个启用了 SSL 的网站,因此每个页面都通过 https 提供服务。 我们最近切换到 Heroku 上的 Ruby on Rails。现在我们在使用 https 时出现
我有一个通过 SSL 服务的站点,该站点位于我管理的服务器上。我还使用 WPEngine 来提供我的博客(因为我不想自己运行 WordPress 安装)。该博客页面当前在没有 HTTPS 的情况下提供
我已经在 WPEngine 的 Git Push 仪表板上设置了我的开发者名称和公钥。我可以通过终端连接: $ ssh git@git.wpengine.com info hello
我是一名优秀的程序员,十分优秀!