Re: [users@httpd] ProxyPassReverse not working in <Location>

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

 



Hi,

Eric B. wrote:
I'm struggling to get Apache to work properly as a Proxy to an internal
server.  I have two copies of the same application running on this internal
server (both ASP applications running on IIS) that I need to access via
different URLs.  I have managed to configure on and got it working without
problems, but it is the second one that is causing me the problem.

Here is my config file
<VirtualHost *:80>
   ServerName www.domain.com
   DocumentRoot "/var/www/html/www.domain.com"

# Production Server
<Location /ASPTest/>
        ProxyPassReverse /
</Location>
        ProxyPass               /ASPTest/ http://192.168.100.1/

# Development & Test Server
<Location /dev/ASPTest/>
        ProxyPassReverse /
</Location>
        ProxyPass               /dev/ASPTest/ http://192.168.100.1:8080/
</VirtualHost>



The ASP application's default.aspx page has a button that redirects the user
to intro.aspx
( Response.Redirect("intro.aspx") )

Now, accessing the server as www.domain.com/ASPTest/ works without problems.
I see the application running on 192.168.100.1 properly.  When I click the
submit button on the default.aspx page, I get redirected to
http://www.domain.com/ASPTest/intro.aspx.  And so on.  This applications
works perfectly well.

However, when I try to access http://www.domain.com/dev/ASPTest/, I run into
problems.  The default page loads fine and shows me default.aspx from port
8080.  However, when I click the submit button on it, I get redirected to
the same page as the non-development one -
http://www.domain.com/ASPTest/intro.aspx.  So from that point on, I am no
longer working with the development code and back to the live production
one.

I tried to use ProxyPassReverse without the <Location> headers, but it
doesn't work at all as soon as it receives the Response.Redirect() code. Instead, I get the browser redirected to http://www.domain.com/intro.aspx, which obviously does not exist. I've also tried using ProxyPassReverse http://192.168.100.1/ in the <Location> tag, but that too does not work - I get the browser redirected to http://www.domain.com/intro.aspx.

Can anyone point me in the right direction here?  Why is my redirect from
/dev/ASPTest/ getting redirected to /ASPTest/ instead?

I believe that this is actually a known fault. I detected it in January this year and got Nick Kew to do some consultancy on it. He confirmed that it was a coding fault and not a configuration problem.

He came up with a patch which I have for 2.0.54. I've tried to hack it to work with 2.0.55 but haven't succeeded yet.

Nick was trying to get this fix (along with the cookie rewriting patch) into the main codebase but I don't believe it happened because he didn't get enough positive votes on the dev mailing list.

I am happy to pass the patch on if you e-mail me off-list.


HTH,


				Neil.

--
Neil Hillard                    hillardn@xxxxxxxxx
Westland Helicopters Ltd.       http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
            views of Westland Helicopters Ltd.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[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