Re: Reverse Proxy URL confuion.

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

 



On Wed, 2009-02-04 at 12:23 -0600, Robert Steinmetz AIA wrote:
> Here is my entire current VirtualHost some of it is probably redundant, 
> like the <Proxy> tags.
> I have tried a lot of variations and so far none of them have affected 
> the error message I get.
> 
> > <VirtualHost *:80 >
> >
> >         ServerAdmin webmaster@localhost
> >         ServerName application.mydomain.com
> >         # DocumentRoot /var/www/application
> >
> >         ProxyRequests Off
> >
> >         <Proxy *>
> >         Order deny,allow
> >         Allow from all
> >         </Proxy>
> >
> >         ProxyPreserveHost On
> >         ProxyPass / http://192.168.1.2/application/
> >         # ProxyPass / http://192.168.1.2/
> >         ProxyPassReverse /  http://192.168.1.2/application/
> >         # ProxyPassReverse / http://192.168.1.2/
> >
> >         SetOutputFilter  proxy-html
> >         ProxyHTMLInterp On
> >         ProxyHTMLExtended On
> >         ProxyHTMLURLMap / /application S
> >
> >
> > </VirtualHost>
> When I access the server at http://application/mydomain/com
> 
> I get the correct login screen which is actually
> 
>     http://application/mydomain.co/default.aspx

My point was that while you can access the login page fine, it contains
an incorrect link that is sending you to the wrong page after you log
in.  The purpose of mod_proxy_html is to adjust this link.

> After logging in I get this error
> 
> >
> >   Server Error in '/application' Application.
> >   ------------------------------------------------------------------------
> >
> >
> >     /The resource cannot be found./
> >
> > * Description: *HTTP 404. The resource you are looking for (or one of 
> > its dependencies) could have been removed, had its name changed, or is 
> > temporarily unavailable.  Please review the following URL and make 
> > sure that it is spelled correctly.
> >
> > * Requested URL: */application/application/file.aspx
> The browser says its at;
> 
>     http://applicaiton.mydomain.com/application/fileaspx
> 
> If I edit the URL in the browser to
> 
>     http://application.mydoamin.com/file.aspx
> 
> everything works fins and the application performs properly.

Two issues:

1. The error you pasted suggests that your ProxyHTMLURLMap rule is not
taking effect at all.  My guess is that you need to include the
configuration file that defines all the places links appear in HTML:

http://apache.webthing.com/svn/apache/filters/proxy_html/proxy_html.conf

2. Your ProxyHTMLURLMap rule is backwards, since you want to *remove*
the /application prefix from the links generated by the back-end (which
is the reverse of the scenario in the HOWTO, as you can see by comparing
your ProxyPass directive to those in the HOWTO).  The rule should be:

ProxyHTMLURLMap / /application

(I don't understand what the capital S was doing at the end of your
rule.)

Once you get the HTML rewriting working, you will need to enable
ProxyPassReverseCookieDomain and ProxyPassReverseCookiePath if your
application uses cookies.

-- 
Matt


---------------------------------------------------------------------
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