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've bought a VPS witch has 2 public IP addresses assigned to it.

I want to configure Apache so I can have two different sites (in separated directories), each one available from a different public IP.

share|improve this question

closed as not a real question by womble, Tom O'Connor, Ladadadada, Ward, voretaq7 Aug 3 '12 at 5:33

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

And your question is ...? – David Schwartz Jul 18 '12 at 8:57
Do you have any control panel on your VPS or its a plain VPS without any control panel ? – user128709 Jul 18 '12 at 8:59
It has no control panel, I've root access via SSH. – hainob Jul 18 '12 at 9:03
I've configured Apache before for using SSL and listening to different ports, so maybe I'm just missing a config line? – hainob Jul 18 '12 at 9:06
Not to be too mean, but this is covered extensively in the Apache documentation and any number of tutorials. Server Fault is a site for professionals, and part of being a professional is reading the documentation. If you've done what the docs say and are still having a problem, please ask a more specific question. – voretaq7 Aug 3 '12 at 5:35

I hope you need to configure Apache for hosting two websites in two different IP address. This is whats called IP based virtual hosting. for this you need configure the both ipaddress in apache2.conf file with Listen Directive.


After restarting you can see that apache is listening on both IPs by applying netstat -ntlp.


share|improve this answer

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