httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <>
Subject Re: [users@httpd] Order of Proxy matching
Date Mon, 25 May 2009 11:37:59 GMT
On Mon, May 25, 2009 at 3:01 AM, Evan Champion <> wrote:
> Hi,
> Can anyone advise of the order in which <Proxy> statements matching the
> same URL are matched?
> I am using SetEnvIf to set a variable that is saved later in the
> access_log.  Sometimes there is a more specific match and a less
> specific match for the same URL, e.g.:
> <Proxy*>
>        SetEnvIf Server_Addr . VAR=first
>      Allow from all
> </Proxy>
> <Proxy http://**>
>        SetEnvIf Server_Addr . VAR=second
>      Allow from all
> </Proxy>
> My observation is that the matches are done in reverse order of
> appearance in the configuration, i.e. in this example, a request to
> will match the http://** rule
> and the variable will be set to "second".  Is it generally correct that
> matches are in reverse order of appearance in the configuration?

I assume in your example you meant "" so both
sections match.   The sections are merged in the same order as they
appear in the config file -- later matching sections override earlier
ones.   <Proxy> doesn't behave like <Directory> in that it doesn't
care about processing "shorter" matches earlier (or regexes later)

Eric Covener

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message