Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect requests

Status
Not open for further replies.

teamakesmefart

Technical User
Dec 3, 2003
10
0
0
GB
Hi All

I have two domains which have the same IP address. When requests come in, my firewall redirects the request to a web server - A Win32 machine running Apache ver 2.0.

This is a live server, servicing requests for one of my sites.

I have recently started developing a new site which uses a whole different set of technologies (Tomcat, JSPs, database connectivity etc). Because of this, and because everything is experimental on the server, I'm likely to be stopping and restarting services on a regular basis. So I decided to keep the new site on a completely different machine ... so I set up a Linux server running Apache and Tomcat.

What I would like to do is get Machine A to service all requests for Domain A itself (which it already does) - but pass all requests for Domain B on to Machine B. It may also be useful on occassion to be able to redirect the request to a particular port on Machine B

Is this possible and can somebody tell me how it is done please?


Many thanks in advance
Pete
Devon, UK
 
At the simplest level do this.

1) Push all requests to Machine A (Apache 2)
2) Define a virtual host for each site on Machine A
3) For the tomcat site instead of having a DocumentRoot on Machine A, define a ProxyPass configuration that passes all of these requests to Machine B

Take a look in that Apache docs for ProxyPass and ProxyPassReverse, very simple command

Code:
ProxyPass / [URL unfurl="true"]http://10.0.0.10[/URL]
ProxyPassReverse / [URL unfurl="true"]http://10.0.0.10[/URL]

This allows you to have one IP serving multiple sites that may or may not be on the apache 2 server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top