httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: [users@httpd] Order of ProxyPass directives
Date Wed, 06 Mar 2019 15:38:48 GMT
On Wed, Mar 6, 2019 at 10:29 AM Tilman Koschnick <til@subnetz.org> wrote:
>
> Hi,
>
> I've set up Apache as a reverse proxy for two different backends, via
> mod_proxy_uwsgi and mod_proxy_http, respectively.
>
> My setup looks like:
>
> <Location /somepath/>
>     ProxyPass http://localhost:8000/ retry=0
>     ProxyPassReverse http://localhost:8000/somepath/
> </Location>
>
> <Location />
>     ProxyPass uwsgi://localhost:8001/ retry=0
>     ProxyPassReverse uwsgi://localhost:8001/
> </Location>
>
> According to http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass
> , rules are processed in order of configuration, so more specific URLs
> should come first. But requests to http://myserver/somepath/ are going to
> the second, uwsgi backend - what am I missing?

That ordering refers to the two-argument version of these directives.
If you enclose them in Location directives, they are going to be
subject to the order of merging configuration sections. For Location,
the 2nd stanza essentially replaces the first.

I'd suggest not wrapping them in Locaton.

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


Mime
View raw message