You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2016/12/09 00:37:49 UTC

[Bug 60458] New: ProxyPass in a Location block loops on local ErrorDocument

https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

            Bug ID: 60458
           Summary: ProxyPass in a Location block loops on local
                    ErrorDocument
           Product: Apache httpd-2
           Version: 2.4.23
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: bugs@httpd.apache.org
          Reporter: alexandre.schaff@gmail.com
  Target Milestone: ---

Hello,
(Finally :o) Upgrading from 2.2, I have either a regression or the same
"behavior change" as commented in
https://bz.apache.org/bugzilla/show_bug.cgi?id=54319.

Please update based on following details.

This conf is added to fresh 2.4.23 build with minimal set of modules ( mpm
worker )
# =======BEGIN
ErrorDocument 400 /error/unavailable
ErrorDocument 401 /error/empty
ErrorDocument 403 /error/forbidden
ErrorDocument 404 /error/unavailable

ProxyErrorOverride On
Alias /error "/tmp/error"
ProxyPass /error !

<Directory "/tmp/error">
 AllowOverride None
 Require all granted
</Directory>

ProxyPass / http://127.0.0.1:1234/
ProxyPassReverse / http://127.0.0.1:1234/
# ========= END

"Server" on 127.0.0.1:1234 responds with status 403, no body.
The configuration above works as expected.

If ProxyPass(Reverse) directives are in a Location block : (rest of
configuration unchanged)....
# =======BEGIN
 <Location />
     Require all granted
     ProxyPass http://127.0.0.1:1234/
     ProxyPassReverse http://127.0.0.1:1234/
 </Location>
# ========= END

... then an internal requests loop starts until LimitInternalRecursion (10) is
reached. Client receives latest 403 response, a status 500 is recorded in
access_log.

note : the same configuration (using Order+Allow instead of Require ) on a
fresh minimal build of 2.2.31 works as expected.

++
N'Alex.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60458] ProxyPass in a Location block loops on local ErrorDocument

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

Alexandre Schaff <al...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW
          Component|Core                        |mod_proxy

--- Comment #3 from Alexandre Schaff <al...@gmail.com> ---
(In reply to Eric Covener from comment #2)
> Are you able to test a patch?

Fix applied and tested 2.4.23.
On that single test, the behavior is consistent with 2.2 : no more internal
loop.

Thanks Eric.

Note : component changed from core to mod_proxy.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60458] ProxyPass in a Location block loops on local ErrorDocument

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

--- Comment #1 from Eric Covener <co...@gmail.com> ---
Created attachment 34509
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34509&action=edit
potential fix

potential fix, untested. Iterates over server conf to check for ! entries.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60458] ProxyPass in a Location block loops on local ErrorDocument

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Eric Covener <co...@gmail.com> ---
Fixed in 2.4.25

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60458] ProxyPass in a Location block loops on local ErrorDocument

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #6 from Eric Covener <co...@gmail.com> ---
FYI this caused a regression, it may be reverted in the next 2.4 release. After
re-reviewing the PR, a better answer may have been "don't put it in <Location>
if you want to have an exception before it.

Bug in the fix aside, one of the points of ProxyPass in <Location> is that it's
a single proxy rule for a location.  So the server-scoped rules, even
exceptions, do not "come first".

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60458] ProxyPass in a Location block loops on local ErrorDocument

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #2 from Eric Covener <co...@gmail.com> ---
Are you able to test a patch?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60458] ProxyPass in a Location block loops on local ErrorDocument

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60458] ProxyPass in a Location block loops on local ErrorDocument

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

Szőgyényi Gábor <sz...@freemail.hu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |szg0000@freemail.hu

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60458] ProxyPass in a Location block loops on local ErrorDocument

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

--- Comment #7 from Michael H <mi...@gmail.com> ---
Hello, we upgraded from 2.4.18 to 2.4.25 and now our configuration isn't
working anymore.

   ProxyPreserveHost On

   <Proxy balancer://ppp>
      BalancerMember http://xxx.xx.xx.xx:8080 route=vm_0 ping=5
      BalancerMember http://xxx.xx.xx.xx:8080 route=vm_1 ping=5
   </Proxy>

   <Location "/service">
     ProxyPass balancer://ppp/system stickysession=JSESSIONID|jsessionid
scolonpathdelim=On
     ProxyPassReverse balancer://ppp/system
     ProxyPassReverse http://ppp.local/system
     ProxyPassReverse https://ppp.local/system
     ProxyPassReverseCookiePath /system /service
   </Location>

   ProxyPass /error !
   ProxyPass /manager !
   ProxyPass / balancer://asp/ stickysession=JSESSIONID|jsessionid
scolonpathdelim=On
   ProxyPassReverse / balancer://ppp/

With 2.4.25 all requests are routet through the last ProxyPass, the Location
directive is ignored so the rewrite from the context is not happening.
Can this be due to this change?

If i put the last ProxyPass in a Location directive like <Location ~
"^/(?!service)"> it's also working.

Thanks in Advance 
Michael

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60458] ProxyPass in a Location block loops on local ErrorDocument

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60458

--- Comment #4 from Jim Jagielski <ji...@apache.org> ---
If this affects trunk, we should fold in there and then propose a back port to
2.4

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org