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

There are few things to add to the title.

Suppose we have a domain and a domain and we want the first to be served by apache and the second to be served by nginx (both running on the same machine, please consider the possibility to use also other web servers, like lighthttpd), and we want them to be accessible just writing the URL and without specifying any port (at least on client side, but a redirect on server side would be acceptable).

Is that possible? How to accomplish something like that? I don't know where to start and googling I can only find how to host multiple domain on the same server... that is not what I'm looking for.

share|improve this question
up vote 6 down vote accepted

It is possible with a few different approaches.

1. Different IP-addresses

Point and to different IP-addresses on the same machine, and make each web server bind to one IP-address each.

2. Run a proxy

Run both domains as virtualhosts in one webserver, and then let e.g. get proxied back to the other web server.

share|improve this answer
Thank you very much. I'll study both approaches. – Zagorax Sep 3 '12 at 16:20

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.