Two servers on same machine, with apache proxing requests for the other one

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


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-07-2006
David Mahon
 
Posts: n/a
Default Two servers on same machine, with apache proxing requests for the other one

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
  #2 (permalink)  
Old 07-07-2006
David Mahon
 
Posts: n/a
Default Re: Two servers on same machine, with apache proxing requests for the other one

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
  #3 (permalink)  
Old 07-07-2006
David Mahon
 
Posts: n/a
Default Re: Two servers on same machine, with apache proxing requests for the other one

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:12 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0