The Apache Haus Forum

Forum Topics => Apache 2.4 => Topic started by: raghavendra.tg on June 29, 2017, 11:42:04 AM

Title: Unable to use Location and PassProxy directive inside it
Post by: raghavendra.tg on June 29, 2017, 11:42:04 AM
Hi,
I am an newbie to this apache world.
I want to have a reverse proxy configuration inside the Location configuration. This location configuration has an setHandlder to my module.
The configuration is as below.
<Location /example>
SetHandler my_handler
ProxyPass "/example/" "http://10.139.8.61:8080/Demo2/"
</Location>
Using this I get a login page from Demo2. Once I enter the user name and password and submit it says file not found. Upon seeing the logs I see that it is going to search for the local file system rather display the success page.
I require help to get this resolved.
Thanks
Raghavendra
Title: Re: Unable to use Location and PassProxy directive inside it
Post by: Gregg on June 29, 2017, 09:32:39 PM
Not being anything close to very knowledgeable of mod_proxy and knowing absolutely nothing about this "handler module" I have suspicion that the handler module intercepts the request after the login at which point it maybe sees what it wants to see only after that time and acts on the request so it never gets to proxypass at that point.

Why is the handler not on the backend server? This will not help me help you because I'm no proxy expert by any means but may help someone else help you.

And on top of all this you are using a rewrite (https://www.apachehaus.com/forum/index.php?topic=1486.msg4030#msg4030) to your handler module so that is might not be helping matters any.
Title: Re: Unable to use Location and PassProxy directive inside it
Post by: mario on July 20, 2017, 10:17:45 PM
You can not run a handler over content from a reverse proxy. You can only apply an outputfilter like mod_sed