Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 289
  • Last Modified:

Apache Server with multiple IPs

I have an apache server set up and running.  Currently it is hosting two websites on one IP address and I want to set up another website using a seperate IP (the reason for this is that the new website must be secure)  I have been able to set up the new site securely on a test server but need some help in splitting the IP's using apache so that everything works properly as I dont really know where to go with this one?
0
allanmayberry
Asked:
allanmayberry
  • 3
  • 3
2 Solutions
 
tmaleshafskeCommented:
Do you have 2 public IP addresses or are these private ip addresses?
0
 
allanmayberryAuthor Commented:
I have 2 public IP addresses.  One of them currently hosts two websites and is working fine - so i dont want to touch these if possible.  The second IP has just been purchased and is where I want to host this secured site.  Thanks
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
tmaleshafskeCommented:
Alright in you vhost.conf you need to have the following lines:  See Code Snippet

Then restart apache
Listen whateveryourfirstipis
Listen whateveryoursecondipis
 
<VirtualHost whateveryourfirstipis:80>
        ServerName whateveryourfirstsiteis
#then the rest of your virtualhost directive
</VirtualHost>
 
<VirutualHost whateveryourfirstipis:80>
         ServerName whateveryoursecondsiteis
#then the rest of your virtualhost directives
</VirtualHost>
<VirtualHost whateveryoursecondipis:443>
        ServerName whateveryousslsiteis
#then the rest of your virtualhost directives
</VirtualHost>

Open in new window

0
 
allanmayberryAuthor Commented:
I've tried what you suggested but I can't seem to get it working??  Initially i can just get the second IP address to be recoginised that would be a start, but I've tried everything and cant figure it out.  Im trying, at the moment, just to assign a website to my second IP address but it doesnt seem to work, the connection just keeps timing out.

I've even tried just changing the IP address to use the new one in place of my existing one to see if I can get it working but nothing.  The IP is working as I can ping it from the command line - and when looking in IIS (IIS is not running btw so it is not causing any conflicts or anything, just handy to check bits and pieces) the secondary IP is availible for selection.

Im stumped!!!???
0
 
tmaleshafskeCommented:
Could you post the output of your vhost.conf and your port.conf
0
 
allanmayberryAuthor Commented:
I've got it working now thanks - just played about with the vhost settings and a the httpd-ssl files
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now