You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Victor Engle <vi...@gmail.com> on 2017/10/04 12:04:33 UTC

[users@httpd] ProxyPass ordering

I have a site where multiple locations are mapped to different Proxy
balancers named balancer1, balancer2, balancer3 etc. One of the locations
mapped is root, "/", and according to the documentation, if that ProxyPass
mapping comes last in the config, it should work as expected. Instead, with
Apache2.4.27, I see everything being sent to the balancer that I've mapped
"/" to. The ProxyPass directives are inside Location directives but they
are in the correct order.

Does having the ProxyPass directives inside Location directives interfere
with the ordering? Is this a known problem? If so, is there a work-around
or recommended way to support a config like this in the latest apache
release.

Thanks,
Vic

Re: [users@httpd] ProxyPass ordering

Posted by Victor Engle <vi...@gmail.com>.
Thanks for the answers. Testing proved that putting the proxypass
directives inside location blocks caused a problem with ordering


On Mon, Oct 23, 2017 at 6:57 AM Daniel <df...@gmail.com> wrote:

> Indeed.
>
> ProxyPass goes most specific first.
> Example of sorting:
> ProxyPass /something ...
> ProxyPass /
>
> While Location should go more global first.
> Example or sorting:
> Location /
> Location /something
>
> As a general rule of thumb, when directive itself specifies url-path
> don't use location, in this case ProxyPass first parameters is an
> url-path, so using location to define proxypass adds unneeded
> complexity.
>
> 2017-10-04 16:07 GMT+02:00 Eric Covener <co...@gmail.com>:
> > My recollection is that the ordering is NOT handled similarly when in
> > Location. Each directive will replace the last.
> >
> > On Wed, Oct 4, 2017 at 8:04 AM, Victor Engle <vi...@gmail.com>
> wrote:
> >> I have a site where multiple locations are mapped to different Proxy
> >> balancers named balancer1, balancer2, balancer3 etc. One of the
> locations
> >> mapped is root, "/", and according to the documentation, if that
> ProxyPass
> >> mapping comes last in the config, it should work as expected. Instead,
> with
> >> Apache2.4.27, I see everything being sent to the balancer that I've
> mapped
> >> "/" to. The ProxyPass directives are inside Location directives but
> they are
> >> in the correct order.
> >>
> >> Does having the ProxyPass directives inside Location directives
> interfere
> >> with the ordering? Is this a known problem? If so, is there a
> work-around or
> >> recommended way to support a config like this in the latest apache
> release.
> >>
> >> Thanks,
> >> Vic
> >>
> >
> >
> >
> > --
> > Eric Covener
> > covener@gmail.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
>
>
> --
> Daniel Ferradal
> IT Specialist
>
> email         dferradal at gmail.com
> linkedin     es.linkedin.com/in/danielferradal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] ProxyPass ordering

Posted by Daniel <df...@gmail.com>.
Indeed.

ProxyPass goes most specific first.
Example of sorting:
ProxyPass /something ...
ProxyPass /

While Location should go more global first.
Example or sorting:
Location /
Location /something

As a general rule of thumb, when directive itself specifies url-path
don't use location, in this case ProxyPass first parameters is an
url-path, so using location to define proxypass adds unneeded
complexity.

2017-10-04 16:07 GMT+02:00 Eric Covener <co...@gmail.com>:
> My recollection is that the ordering is NOT handled similarly when in
> Location. Each directive will replace the last.
>
> On Wed, Oct 4, 2017 at 8:04 AM, Victor Engle <vi...@gmail.com> wrote:
>> I have a site where multiple locations are mapped to different Proxy
>> balancers named balancer1, balancer2, balancer3 etc. One of the locations
>> mapped is root, "/", and according to the documentation, if that ProxyPass
>> mapping comes last in the config, it should work as expected. Instead, with
>> Apache2.4.27, I see everything being sent to the balancer that I've mapped
>> "/" to. The ProxyPass directives are inside Location directives but they are
>> in the correct order.
>>
>> Does having the ProxyPass directives inside Location directives interfere
>> with the ordering? Is this a known problem? If so, is there a work-around or
>> recommended way to support a config like this in the latest apache release.
>>
>> Thanks,
>> Vic
>>
>
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



-- 
Daniel Ferradal
IT Specialist

email         dferradal at gmail.com
linkedin     es.linkedin.com/in/danielferradal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyPass ordering

Posted by Eric Covener <co...@gmail.com>.
My recollection is that the ordering is NOT handled similarly when in
Location. Each directive will replace the last.

On Wed, Oct 4, 2017 at 8:04 AM, Victor Engle <vi...@gmail.com> wrote:
> I have a site where multiple locations are mapped to different Proxy
> balancers named balancer1, balancer2, balancer3 etc. One of the locations
> mapped is root, "/", and according to the documentation, if that ProxyPass
> mapping comes last in the config, it should work as expected. Instead, with
> Apache2.4.27, I see everything being sent to the balancer that I've mapped
> "/" to. The ProxyPass directives are inside Location directives but they are
> in the correct order.
>
> Does having the ProxyPass directives inside Location directives interfere
> with the ordering? Is this a known problem? If so, is there a work-around or
> recommended way to support a config like this in the latest apache release.
>
> Thanks,
> Vic
>



-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org