views:

781

answers:

2

Under my domain, one of the subdomain must be directed to one server that hosts the relevant applications, and the rest must be directed to another server that hosts the relavant applications.

So, any requests to the url appa.example.com\* must be directed to one server, and any requests to the url appb.example.com\* must be directed to another server.

The issue now is how to configure the Apache configuration on both servers-- maybe using configuration like ProxyPass or ProxyPassReverse so that they all the incoming requests can be directed correctly at the correct server?

Edit to make the question clearer.

+2  A: 

The place to link an url to an IP (server) is the DNS.

For example if server A is at 1.2.3.4 and server B at 5.6.7.8 you link appa.example.com to 1.2.3.4 and appb.example.com to 5.6.7.8.

But if both servers are behind a firewall (with a single external IP address) you have to perform some tricks. (And you are probably looking for these tricks).

Have a look at An Introduction to Redirecting URLs on an Apache Server.

Gamecat
Yup, I am looking at those tricks
Ngu Soon Hui
Question was not that clear, but I Added a link which will possibly help.
Gamecat
I think the link is not relevant; I am asking about redirecting different subdomain requests to different servers, not URL redirection
Ngu Soon Hui
A: 
miCRoSCoPiC_eaRthLinG