【问题标题】:Apache reverse proxy and infinite loopApache 反向代理和无限循环
【发布时间】:2017-11-24 04:38:39
【问题描述】:

我有服务器 A 和 B。服务器 A 托管主站点 www.example.com,服务器 B 托管另一个使用子域 test.example.com 的站点。在服务器 A 上,我设置了一个反向代理,以便可以通过 www.example.com/test 访问在 test.example.com 上运行的 Wordpress 站点

现在我希望子域 test.example.com 对用户“不可见”,以便对 test.example.com 的请求将重定向到 www.example.com/test。 显然,这让我陷入了无限循环。我尝试了不同的方法来打破循环无济于事。 有没有办法做到这一点?

【问题讨论】:

    标签: wordpress apache reverse-proxy


    【解决方案1】:
    <VirtualHost *:80>
      ServerName test.example.com
      RedirectMatch permanent ^/(.*) www.example.com/test
    </VirtualHost>
    

    添加上面的apache conf并重启apache。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-01-09
      • 2015-11-28
      • 2020-09-22
      • 1970-01-01
      • 2013-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多