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.

vartec
  • 131,205
  • 36
  • 218
  • 244
Graviton
  • 81,782
  • 146
  • 424
  • 602

3 Answers3

4

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.

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
1

I've done the same thing for my workplace (a University). Our primary website it hosted elsewhere but part of the site (student registration system) is hosted onsite.

What I did was to create a Authoritative (A) DNS Record (reg.domain.com) and made it point to the IP of our onsite server. And that did the trick!!!

Here's a screenshot of the same from my domain CP (domain and IP masked for obvious reasons)... alt text http://img443.imageshack.us/img443/5069/stiuaregrecord.jpg

It's essentially the same as what you're trying to do. Give it a shot and see :)

miCRoSCoPiC_eaRthLinG
  • 2,910
  • 4
  • 40
  • 56
0

In the DNS records/manager for the parent domain of the intended subdomain:

  • point the subdomain name at the to-be host servers IP address, then ...

... Then ...

In the host server DNS and or server-software config: direct the subdomain to the website app. You can achieve this by one of: -

  • manually edit the DNS records,
  • park the subdomain and point it at the website document root folder, or
  • add the domain and subdomain (domain will never be used since its not pointed at applicable server). Point them both at the document root for your now subdomained (if there is such a word) website app
user229044
  • 232,980
  • 40
  • 330
  • 338
ekerner
  • 5,650
  • 1
  • 37
  • 31