简体   繁体   中英

Apache mod_proxy not forwarding all requests

I have a Bottle/Python app running on localhost:3000 that I am using Apache mod_proxy to forward requests to. Its working 99% of the time, except when I try and go to a url like:

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

(basically, there is a URL that is a part of the URL but its been run through encodeURIComponent). In this case, Apache is returning its own 404 page and not passing the url through to the backend server.

My apache config is as follows:

<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>

Why is Apache not proxying this URL? (you can visit it yourself to see the Apache 404 page where a Bottle page should be)

EDIT: I've worked around it by passing the URL as a GET parameter. I still dont know why Apache isnt working as advertised though...

By default, Apache doesn't pass through urls with %2F in them. See the link below for more info.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM