Re: ProxyPass with Location in 2.4.25

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Most specific proxypass directives take precedence over the most "global" ones, while with Location is the opposite, you must define the most global paths first and then the most specific.

So with ProxyPass the correct order or definition would be (if you define /something later it will be ignored):
ProxyPass /something ...
ProxyPass /

While with Location the order of definition should be (If you define /something first it "overriden" with "/" settings):
<Location />
<Location /something>

So whatever happened earlier (but I too found weird that this has changed), mixing ProxyPass in virtualhost with ProxyPass in Location is a recipe for confusion and problems, and I have to read what you did, I could also find logical your Location is ignored, because Location works differently than ProxyPass.

My suggestion is just define ProxyPass and similar directives directly in virtualhost and use Location for something that can't be avoidable in certain cases, like authz related directives, etc. And remember the desirable order of preference to not get directives ignored.

If there is a bug or a real change between versions, I leave that to Nick and the other devs :)

2017-05-09 12:31 GMT+02:00 Michael Haas <michael.haas10@xxxxxxxxx>:
i only updated apache + openssl from source.
The only thing i found what changed in 2.4.25 with proxypass and location is this https://bz.apache.org/bugzilla/show_bug.cgi?id=60458
And i think this is the same problem which i have http://stackoverflow.com/questions/43606856/apache2-configuration-virtualserver-reverseproxy-location-directive-broke-a


2017-05-09 11:17 GMT+02:00 Nick Kew <niq@xxxxxxxxxx>:
On Tue, 9 May 2017 10:08:36 +0200
Michael Haas <michael.haas10@xxxxxxxxx> wrote:


> With 2.4.25 all requests are routet through the last ProxyPass, the
> Location directive is ignored so the rewrite from the context is not
> happening.
> If i put the last ProxyPass in a Location directive like <Location ~
> "^/(?!service)"> it's again working.
>
> Is this a intended change?

Interesting.  No, an upgrade between different 2.4.x versions
shouldn't have broken your configuration, unless a security fix
had made it unavoidable (which isn't the case here).  And that
should've been clearly documented as an upgrade note!

Are you sure nothing else changed at the same time as your upgrade?
Did you build from source or install a packaged or third-party version?

--
Nick Kew

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





--
Daniel Ferradal
IT Specialist

email         dferradal at gmail.com

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux