Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th May 2012, 21:57
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 368
Thanks: 25
Thanked 47 Times in 42 Posts
Default Websites with same domain name, different IP addresses?

I apologize if this question has been raised before; I did perform a search (and it returned 12 pages, with no relevant results in the first four).

I am wondering about the logic behind preventing two websites from having the same domain name -- when the IP addresses on which to listen are different.

I'm sure someone is thinking, "Why would you ever want to do that?"

I want to do it because I am migrating a website from one IP address to another IP address -- on the same server/ISPConfig installation.

Ideally, I would create identical websites -- one on each IP address -- so that once I update the DNS record (hosted externally), it doesn't matter which IP address the site-visitor hits when he visits the domain in question. The user experience should be the same for each IP address.

Is there a technical reason for which Apache cannot accommodate this setup?

Wouldn't it be perfectly valid to do something like this in the Apache configuration?

Code:
<VirtualHost 1.2.3.4>
DocumentRoot /www/example
ServerName www.example.com
</VirtualHost>

<VirtualHost 4.5.6.7>
DocumentRoot /www/example
ServerName www.example.com
</VirtualHost>
If I try that locally, Apache does not throw warnings/errors, and pages continue to be served from localhost without issue.

Thanks for any insights.
Reply With Quote
Sponsored Links
  #2  
Old 18th May 2012, 16:48
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

I'm sure this is technically possible, but it's just a decision we made to prevent users from creating the same web site twice.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 18th May 2012, 17:06
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 368
Thanks: 25
Thanked 47 Times in 42 Posts
Default

Thank you for the prompt reply, Falko.

Would you consider this to be a valid "feature request"? Due to the fact that ISPConfig forbids this configuration, I now have to:

1.) Move the site in question to a completely different physical server (even though I have plenty of unused IP addresses on the current server). This is a major headache because we don't allow remote MySQL connections, so a second database has to be stood-up on the new server, and the data in each DB merged later on. (Replication would be ideal, but is outside the scope of this change.)

2.) Update the DNS records to point to the other server.

3.) Once look-ups are resolving to the new IP address (on the separate physical box), change the domain in the Website tab on the original server.

4.) Update DNS to point back to the original server (but different IP address).

5.) Delete the "temp" site.

It seems that need to move a website from one IP address to another, on the same server, should be fairly common, especially given the lack of ubiquitous support for SNI at this time.
Reply With Quote
  #4  
Old 18th May 2012, 17:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

If you select * in the website settings, then you can access the site from both IP addresses.

If thats not a option, then just create a copy of the vhost file of the existing site in /etc/apache2/sites-available, the name of the file does not matter, edit the ip address inside the file and save it. Then create a symlink in /etc/apache2/sites-enabled/ pointing to that file and restart apache.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 18th May 2012, 17:18
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 368
Thanks: 25
Thanked 47 Times in 42 Posts
Default

Thanks for the reply, Till.

Quote:
If you select * in the website settings, then you can access the site from both IP addresses.
I require a dedicated IP address for SSL on this particular domain. And this box is configured to support SNI, so there are dozens of other websites that are bound to all interfaces ("*"), each with a unique/proper SSL certificate.

Does that mean selecting "*" this is not an option in this particular case? What if I change all of the sites that leverage SNI to be bound to a specific IP address (other than the new one I just added to support SSL on this site).

If not, I will try the other steps you suggested. They make sense.

Thanks again!
Reply With Quote
  #6  
Old 21st May 2012, 09:25
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

If sni works or not depends mostly on the briwsers that are used to access the sites, especially IE was very late in implementing SNI. If SSL by SNI is fine for you, then you can use * for all sites.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
apache, hostname, ip address, multiple, vhost

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access isispConfig3 websites created without domain names kmchen Installation/Configuration 10 6th January 2012 16:16
Postfix/courier/Centos 6 cant send email to external email servers maxtorzito Installation/Configuration 14 7th October 2011 10:56
RoundCube Sends but will not receive. happz Installation/Configuration 33 17th April 2010 21:55
Need help get mail to work (can't recieve and apperently can't send) omega13a Installation/Configuration 19 20th August 2009 21:06
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 17:51


All times are GMT +2. The time now is 04:45.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.