Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two servers running Debian with Virtualmin/Webmin and I wanted to look how can I redirect a subdomain, like to my second server. In example:

  • I have on the first server, IP address
  • I have a second server with IP address
  • My router is set to redirect connections to 80 port the first server IP (, but when accessing how can I do so Apache redirects it to the second server ( Thanks a lot :D
share|improve this question
up vote 0 down vote accepted

Maybe you should use mod_proxy for this case.

Set up one Apache at the front, and use mod_proxy to fetch the content from one of the the two servers behind.

share|improve this answer
Then I would do something like: <Location /> ProxyPass </Location> – pmerino Jun 28 '11 at 9:04
EDIT: exactly, thats the way i would do it – Thomas Berger Jun 28 '11 at 9:06
Yep I know, but then I should add entries to the main server's hosts file so second server can recognize it. EDIT: thinking about it I think maybe not, but not sure as I don't have the server her right now, will mark as answer – pmerino Jun 28 '11 at 9:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.