Bug 54319 - ProxyPass has no effect in <Location> if rewrite occurs
Summary: ProxyPass has no effect in <Location> if rewrite occurs
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.3
Hardware: Other Linux
: P1 regression with 2 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-17 10:46 UTC by Laurent
Modified: 2021-08-07 05:26 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent 2012-12-17 10:46:24 UTC
Hi all,
My Apache is configured as a reverse proxy :

  RewriteCond     %{REQUEST_URI}  ^/pioupiou/
  RewriteRule     ^/pioupiou/     /mirror/foo/ [PT]

  <Location /mirror/foo/>
      ProxyPass http://backend.example.com/
  </Location>

If I request : http://mondomain/mirror/foo/ => I access correctly to backend.example.com/
If I request : http://mondomain/pioupiou/ => Apache is rewritting correctly but return an HTTP404 /htdocs/mirror not found (in other words, the ProxyPass have been ignore)

If I remove the <Location> notation and get the right syntax for ProxyPass :
  RewriteCond     %{REQUEST_URI}  ^/pioupiou/
  RewriteRule     ^/pioupiou/     /mirror/foo/ [PT]

  ProxyPass /mirror/foo/ http://backend.example.com/

If I request : http://mondomain/pioupiou/ => it works !!
Comment 1 sebmoule 2012-12-20 14:09:51 UTC
Hi,

I've got the same problem, is there a Big regression of how <Location> works with mod_proxy ??
Comment 2 Laurent 2013-01-01 18:05:43 UTC
Hi,
Any informations about this regression ?

Thanks in advance.
Comment 3 Eric Covener 2013-01-01 19:29:50 UTC
This is a behavior change, I have started a discussion on dev@httpd.apache.org to discuss if the 2.2 behavior needs to be preserved in 2.4 or just documented.