【问题标题】:How to configure WPEngine to work with DigitalOcean and Nginx如何配置 WPEngine 以使用 DigitalOcean 和 Nginx
【发布时间】:2018-07-27 17:26:47
【问题描述】:

我有一个 WPEngine 服务器在所有 Wordpress 制作的 .com url 上运行,我还有一个 web 应用程序在由 Docker 管理的 DigitalOcean droplet 上运行,并使用 Nginx 作为该应用程序的反向代理。如何将通配符域(例如 test.company.com)映射到 DigitalOcean droplet 并让它从该 url 提供 Web 应用程序并向其添加 SSL?

【问题讨论】:

    标签: wordpress nginx dns digital-ocean


    【解决方案1】:

    您应该能够将 Nginx 实例配置为反向代理,以将请求转发到 WPEngine 实例,然后将响应返回给请求者。

    您可以从一个非常简单的配置开始,如下所示:

    server{
        listen    80;
        server_name    test.company.com;
    
        location  / {
            proxy_pass          https://exampleblog.wpengine.com:443/;
            proxy_set_header    Host                 exampleblog.wpengine.com;
        }
    
    }
    

    有关讨论将 WPEngine 内容缓存和重新映射到 /blog/ 子目录的更完整示例,您可以阅读 this blog article

    祝你好运!

    【讨论】:

    • 感谢您的解决方案。我能够通过在 wpengine 中打开 80 只在主机/ip 中传递来完成它。
    猜你喜欢
    • 2015-09-04
    • 2021-03-02
    • 2016-11-07
    • 2014-10-19
    • 1970-01-01
    • 2013-05-14
    • 1970-01-01
    • 2016-12-08
    • 1970-01-01
    相关资源
    最近更新 更多