View Single Post
  #12  
Old 24th October 2011, 18:37
sjswarts sjswarts is offline
Senior Member
 
Join Date: May 2011
Location: Australia
Posts: 135
Thanks: 17
Thanked 5 Times in 5 Posts
Default

Ok so I have figured it out thanks to Till (sent me in the right direction)

This is how to do it if you meet the criteria of having Debian and ISPConfig installed on your nominated recipient of the port 80 request. Other flavors no doubt will work as well just might need some editing. Also make sure you have a A record set up for the secondary apache web server.

Port 80 for me was sent to server1.example.com which had a ip of 192.168.1.1/24

So I edited example.com.vhost in /etc/apache2/sites-available/example.com.vhost

Scroll down to after it talks about the directory locations and settings (probably doesn't need to be here but that is where i put it) and place this (obviously editing it to suit your needs)

================================================== ======

ProxyRequests Off
ProxyPreserveHost On

<Proxy 10.1.5.15:80>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /example http://server2.example.com/example
ProxyPassReverse /example http://server2.example.com/example

================================================== =======

What I forgot to add was the example after the forward slash. After restarting apache with a /etc/init.d/apache2 restart everything went where I wanted it.

Hopefully this helps someone else. Thanks to all and if it doesn't work out I will come back here...

Regards,
Steve

Last edited by sjswarts; 24th October 2011 at 18:38. Reason: Incorrect syntax
Reply With Quote