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 2008/07/18 15:28:10 UTC

DO NOT REPLY [Bug 45434] New: ProxyPassReverse and balancer:// don' t play nice

https://issues.apache.org/bugzilla/show_bug.cgi?id=45434

           Summary: ProxyPassReverse and balancer:// don't play nice
           Product: Apache httpd-2
           Version: 2.2.9
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: All
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: noah@hd.se


I believe there's an issue with how ProxyPassReverse handles redirects in
conjuction with mod_proxy_balancer.
See below for an example configuration which details the setup.

The browser requests /foo from the Apache HTTPd  frontendserver. The frontend
server forwards the request to one of the balancer member servers (backend
servers).
The backend server decides /myservice/foo is a directory and redirects to
/myservice/foo/

The browsers get the following Location: header back:
Location: http://example.net/myservice/foo/

>From the below configuration you'd expect it to be just
"http://example.net/foo/", with "/myservice" zapped. That's at least how things
work when you're not using mod_proxy_balancer (see "Demo 3" below) at all.


An example configuration which details the issue in two ways with
mod_proxy_balancer (demo 1 and 2) and one example which doesn't use
mod_proxy_balancer and provides the expected result (demo 3) 
<VirtualHost *>
    ServerName example.net

        # Demo 1: The following does not work:
        ProxyPass                       /              
balancer://mycluster/myservice/ stickysession=JSESSIONID|jsessionid
nofailover=On
        ProxyPassReverse        /               balancer://mycluster/myservice/
        <Proxy balancer://mycluster>
                        BalancerMember http://tomcat1.example.net:8180
                        BalancerMember http://tomcat2.example.net:8180
        </Proxy>

        # Demo 2: ..and neither does this
        ProxyPass                       /               balancer://mycluster/
stickysession=JSESSIONID|jsessionid nofailover=On
        ProxyPassReverse        /               balancer://mycluster/
        <Proxy balancer://mycluster>
                        BalancerMember
http://tomcat1.example.net:8180/myservice/
                        BalancerMember
http://tomcat2.example.net:8180/myservice/
        </Proxy>


        # Demo 3: This works though (but we can't do LB)
        ProxyPass                       /
http://tomcat1.example.net:8180/myservice/
        ProxyPassReverse        / http://tomcat1.example.net:8180/myservice/

</VirtualHost>


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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 45434] ProxyPassReverse and mod_proxy_balancer breaks redirects

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

--- Comment #6 from Rainer Jung <ra...@kippdata.de> ---
Bug was reintroduced in 2.4 and trunk.
Fixed in r1365479 for trunk and r1365604 for 2.4.
Released with 2.4.3.

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


DO NOT REPLY [Bug 45434] ProxyPassReverse and mod_proxy_balancer breaks redirects

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


Will Rowe <wr...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |FIXED




--- Comment #4 from Will Rowe <wr...@apache.org>  2009-05-19 11:00:02 PST ---
Note, 

ProxyPassReverse    /        balancer://mycluster/
was fixed by 2.2.9, and

ProxyPassReverse    /        balancer://mycluster/myservice/
is fixed for future 2.x releases, and proposed for backport to 2.2.12

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45434] ProxyPassReverse and mod_proxy_balancer breaks redirects

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

--- Comment #5 from Joe Orton <jo...@redhat.com> 2011-02-16 11:46:26 EST ---
For posterity, looks like this was fixed in r777191 for 2.2.x.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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 45434] ProxyPassReverse and mod_proxy_balancer breaks redirects

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

--- Comment #7 from Jackie Rosen <ja...@hushmail.com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.

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


DO NOT REPLY [Bug 45434] ProxyPassReverse and mod_proxy_balancer breaks redirects

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





--- Comment #1 from noah <no...@hd.se>  2008-07-18 06:52:10 PST ---
Here's log output aswell.

mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL
//mycluster/myservice/foo
mod_proxy_balancer.c(276): proxy: BALANCER: Found value (null) for
stickysession JSESSIONID|jsessionid
mod_proxy_balancer.c(952): proxy: Entering byrequests for BALANCER
(balancer://mycluster)
mod_proxy_balancer.c(535): proxy: BALANCER (balancer://mycluster) worker
(http://tomcat1.example.net:8180/) rewritten to
http://tomcat1.example.net:8180//myservice/foo
mod_proxy.c(966): Running scheme balancer handler (attempt 0)
mod_proxy_http.c(1909): proxy: HTTP: serving URL
http://tomcat1.example.net:8180//myservice/foo
proxy_util.c(2044): proxy: HTTP: has acquired connection for
(tomcat1.example.net)
proxy_util.c(2102): proxy: connecting
http://tomcat1.example.net:8180//myservice/foo to tomcat1.example.net:8180
proxy_util.c(2195): proxy: connected //myservice/foo to
tomcat1.example.net:8180
proxy_util.c(2347): proxy: HTTP: fam 2 socket created to connect to
tomcat1.example.net
proxy_util.c(2448): proxy: HTTP: connection complete to 172.20.11.240:8180
(tomcat1.example.net)
proxy_util.c(1071): ppr: real: balancer://mycluster/myservice/
proxy_util.c(1085): ppr: checking balancer: balancer://mycluster
proxy_util.c(1097): ppr: matching member (http://tomcat1.example.net:8180/) and
URL (http://tomcat1.example.net:8180/myservice/foo/)
proxy_util.c(1104): ppr: matched member (/myservice/foo/)
mod_proxy_http.c(1686): proxy: start body send
mod_proxy_http.c(1775): proxy: end body send
proxy_util.c(2062): proxy: HTTP: has released connection for
(tomcat1.example.net)
proxy_util.c(1854): proxy: grabbed scoreboard slot 2 in child 18003 for worker
http://tomcat1.example.net:8180/
proxy_util.c(1873): proxy: worker http://tomcat1.example.net:8180/ already
initialized
proxy_util.c(1967): proxy: initialized single connection worker 2 in child
18003 for (tomcat1.example.net)
proxy_util.c(1854): proxy: grabbed scoreboard slot 3 in child 18003 for worker
http://tomcat1.example.net:8180/
proxy_util.c(1873): proxy: worker http://tomcat1.example.net:8180/ already
initialized
proxy_util.c(1967): proxy: initialized single connection worker 3 in child
18003 for (tomcat1.example.net)


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45434] ProxyPassReverse and balancer:// breaks redirects

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


noah <no...@hd.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ProxyPassReverse and        |ProxyPassReverse and
                   |balancer:// don't play nice |balancer:// breaks redirects




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45434] ProxyPassReverse and mod_proxy_balancer breaks redirects

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


noah <no...@hd.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ProxyPassReverse and        |ProxyPassReverse and
                   |balancer:// breaks redirects|mod_proxy_balancer breaks
                   |                            |redirects




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45434] ProxyPassReverse and mod_proxy_balancer breaks redirects

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


Ruediger Pluem <rp...@apache.org> changed:

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




--- Comment #3 from Ruediger Pluem <rp...@apache.org>  2008-07-18 08:29:06 PST ---
Your configuration is just wrong. In all three cases please add the following
*two* ProxyPassReverse directives:

ProxyPassReverse        / http://tomcat1.example.net:8180/myservice/
ProxyPassReverse        / http://tomcat2.example.net:8180/myservice/


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45434] ProxyPassReverse and mod_proxy_balancer breaks redirects

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





--- Comment #2 from Noah Williamsson <no...@hd.se>  2008-07-18 07:13:33 PST ---
I believe the bug for "Demo 1" is somewhere around this block at line 2502 in
modules/proxy/proxy_util.c.
                l2 = strlen(u);
                if (l1 >= l2 && strncasecmp(u, url, l2) == 0) {
                    u = apr_pstrcat(r->pool, ent[i].fake, &url[l2], NULL);
                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                         "ppr: matched member (%s)", u);
                    return ap_construct_url(r->pool, u, r);
                }


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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