You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Oliver Crow <oc...@bmrc.berkeley.edu> on 1999/07/07 05:10:11 UTC

mod_proxy/4708: ProxyPass in default VirtualHost overrides top-level ProxyPass

>Number:         4708
>Category:       mod_proxy
>Synopsis:       ProxyPass in default VirtualHost overrides top-level ProxyPass
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Jul  6 20:20:00 PDT 1999
>Last-Modified:
>Originator:     ocrow@bmrc.berkeley.edu
>Organization:
apache
>Release:        1.3.6
>Environment:
FreeBSD  2.2.8-RELEASE 
>Description:
When I put a ProxyPass directive in the top-level of the configuration, and also
put a ProxyPass directive in a virtual host configuration, the virtual 
host directive is followed, but the top level one is not (for that virtual 
host).  Removing the virtual host ProxyPass directive causes the 
top-level one to become active again.

This behaviour of ProxyPass is different from ScriptAlias and Redirect.  Those 
directives can be used in the VirtualHost and the main configuration
simultaneously and both will take effect.

Weirdly, in the output of 'server-info', both directives are listed under the
mod_proxy "Current Configuration" although only one directive takes effect.
>How-To-Repeat:
In the 'main' server configuration I have:
ProxyVia full
ProxyPass /mperl/ http://localhost:3000/mperl/

In the VirtualHost section (doing virtual hosting by name), I have:
    ProxyPass /perl/ http://localhost:3000/perl/

When I GET "http://mydomain/mperl/", I get a file not found error
When I GET "http://mydomain/perl/", the request is redirected as expected to http://localhost:3000/perl/

>Fix:
A workaround is to repeat any global ProxyPass directives in every VirtualHost
section that also specifies a local ProxyPass.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]