Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
1  
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 ? –  StormInternet 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
add comment

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.

1 Answer

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.

Listen 192.168.1.20:80
Listen 192.168.1.21:80

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

Regards

share|improve this answer
add comment

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