【问题标题】:Apache mod_proxy not forwarding all requestsApache mod_proxy 不转发所有请求
【发布时间】:2013-02-25 13:07:58
【问题描述】:

我有一个在 localhost:3000 上运行的 Bottle/Python 应用程序,我正在使用 Apache mod_proxy 将请求转发到。它 99% 的时间都在工作,除非我尝试访问如下网址:

http://m2t.openseedbox.com/api/upload/http%3A%2F%2Ftorrents.thepiratebay.se%2F6753175%2FPioneer_One_S01E04_720p_x264-VODO.6753175.TPB.torrent

(基本上,有一个 URL 是 URL 的一部分,但它是通过 encodeURIComponent 运行的)。在这种情况下,Apache 返回它自己的 404 页面,而不是将 url 传递给后端服务器。

我的 apache 配置如下:

<VirtualHost *:80>
        ServerName m2t.openseedbox.com

        ProxyPass / http://127.0.0.1:3000/ retry=0
        ProxyPassReverse / http://127.0.0.1:3000/
        ProxyPreserveHost On
</VirtualHost>

为什么 Apache 不代理此 URL? (你可以自己去看看应该是Bottle页面的Apache 404页面)

编辑:我通过将 URL 作为 GET 参数传递来解决它。我仍然不知道为什么 Apache 没有像宣传的那样工作......

【问题讨论】:

    标签: apache mod-proxy bottle


    【解决方案1】:

    默认情况下,Apache 不会通过其中包含 %2F 的 url。有关详细信息,请参阅下面的链接。

    %2F in URL breaks and does not reference to the .php file required

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-27
      • 2013-01-09
      • 2012-09-06
      • 2017-01-31
      • 2015-02-19
      • 1970-01-01
      相关资源
      最近更新 更多