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 online now
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 online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,576
Thanks: 792
Thanked 4,980 Times in 3,901 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 online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,576
Thanks: 792
Thanked 4,980 Times in 3,901 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
  #7  
Old 21st May 2012, 15:38
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 368
Thanks: 25
Thanked 47 Times in 42 Posts
Default

Thanks, Till.

As a bit of background, I just added a second IP address to this server. I'm already using SNI for about a dozen sites on this box, and it works as well as expected as far as the server is concerned (the lack of browser support [mostly IE and Android] is another issue). Each of those sites has "*" selected for the IP address.

I would like to continue using SNI on all of the existing sites, except one. I need a particular site to have a dedicated IP address, and SSL (SNI is not acceptable for this site).

Should I leave all of the existing sites set to "*" and change only the one site that requires a dedicated IP address to the corresponding literal IP (within the ISPConfig interface)?

Last edited by cbj4074; 21st May 2012 at 15:50. Reason: Made no sense.
Reply With Quote
  #8  
Old 12th July 2012, 23:51
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 368
Thanks: 25
Thanked 47 Times in 42 Posts
Default

Hi, everyone. I'm still wondering how to do this:

Quote:
Originally Posted by cbj4074 View Post
I would like to continue using SNI on all of the existing sites, except one. I need a particular site to have a dedicated IP address, and SSL (SNI is not acceptable for this site).

Should I leave all of the existing sites set to "*" and change only the one site that requires a dedicated IP address to the corresponding literal IP (within the ISPConfig interface)?
As a bit of background, I have one IP address created in ISPConfig. I have several websites that are bound to "*" in ISPConfig's Website -> Domain tab (no website is bound to the literal IP address).

How can I use SSL for the one website that I want to be the "primary", without the attendant SNI issues with older browsers (such as IE6), but at the same time use SNI (each site with its own self-signed certificate) for all other domains on the same IP address?

In other words, if I type the server's IP address in my browser's URL field, with the https protocol, I want to hit the "primary" site to which the proper SSL certificate is issued. Naturally, I want to hit the same primary site when I enter it's domain name (with https). Finally, I want to hit the various other sites that are hosted at the same IP address by domain name, with https, and leverage SNI for each.

The basis of my concern is that I have enabled SSL for sites other than the primary domain, and things have not behaved as expected. I have been directed to the wrong website whenever I try to connect over SSL.

Thanks for any help!
Reply With Quote
  #9  
Old 13th July 2012, 08:45
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,576
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
 
Default

Quote:
As a bit of background, I have one IP address created in ISPConfig. I have several websites that are bound to "*" in ISPConfig's Website -> Domain tab (no website is bound to the literal IP address).
Dont mix * and IP addresses in websites, thsi will cause redirect failures in apache. Either use * for all sites or select the IP address for all sites but dont mix that as a IP address is always a stroinger match then a wildcard in apache.

Quote:
How can I use SSL for the one website that I want to be the "primary", without the attendant SNI issues with older browsers (such as IE6), but at the same time use SNI (each site with its own self-signed certificate) for all other domains on the same IP address?
Assign a separate IP address to the site. This IP may not be shared with any other website.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
cbj4074 (23rd July 2012)
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 10:02.


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