This is a discussion on Two servers on same machine, with apache proxing requests for the other one within the Apache Web Server forums, part of the Web Server and Related Forums category; Hope someone can help. I'm running apache v2.2.2 on Windows port 80. I also run another application ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hope someone can help. I'm running apache v2.2.2 on Windows port 80. I
also run another application that requires HTTP access on the same machine, port 81. Unfortunately, some machines I use off-site only allow port 80 outgoing access. How do I tell apache to reverse-proxy requests to the other application? Eg. http://www.abc.com/* should be handled by apache except for http://www.abc.com/app should be forwarded to http://www.abc.com:81 -- David Mahon |
|
|||
|
In article <slrneas0uh.1ob.davideyeahsure@fogg.onlyforfun.net >, Davide
Bianchi <davideyeahsure@onlyforfun.net> writes >On 2006-07-06, David Mahon <news@amigo.co.uk> wrote: >> How do I tell apache to reverse-proxy requests to the other application? > >ProxyPass /app http://...:81/ >ProxyPassReverse /app http://...:81/ > >The problem in this case is that, if the 'target' application is using >/index.html in an URL, that won't be translated into /app/index.html >so you'll get the wrong page or a 404. > >The best would be to use a VHost and redirect everything from the root >of the VHost instead of just /app. How do I do it? I have a spare domain name (lets call it xxxxxxxx.com) so I can just forward the entire domain to the other application. I've tried using the following in the httpd-vhosts.conf <VirtualHost *:80> ProxyPreserveHost On ProxyPass / http://127.0.0.1:81 ProxyPassReverse / http://127.0.0.1/:81 ServerName www.xxxxxxxx.com </VirtualHost> but then I can't start apache (it fails, nothing in the log file but service specific error 1 in Windows Event Viewer). As soon as any of the lines begging "Proxy" are present, Apache fails to start. -- David Mahon |
|
|||
|
In article <0c35rTBnUrrEFwEE@earth.amigo.co.uk>, David Mahon
<news@amigo.co.uk> writes >I've tried using the following in the httpd-vhosts.conf > ><VirtualHost *:80> >ProxyPreserveHost On >ProxyPass / http://127.0.0.1:81 >ProxyPassReverse / http://127.0.0.1/:81 >ServerName www.xxxxxxxx.com ></VirtualHost> > >but then I can't start apache (it fails, nothing in the log file but >service specific error 1 in Windows Event Viewer). As soon as any of >the lines begging "Proxy" are present, Apache fails to start. Sorry, please ignore. The proxy modules were not loaded in the default apache configuration. Now I've turned them on and got it working. -- David Mahon |