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 3rd December 2012, 09:03
sjswarts sjswarts is offline
Senior Member
 
Join Date: May 2011
Location: Australia
Posts: 135
Thanks: 17
Thanked 5 Times in 5 Posts
Smile (SOLVED) Enabling SSL redirects to the first website using SSL

Debian 6 Squeeze - ISPConfig 3 - Postfix, Dovecot, Apache2, Bind, Horde 5

G'day guys,

I have multiple websites hosted on this VPS. Now I have never had an issue due to nobody ever wanted SSL access on their website. They do now.

For example I have the following:

example.com
example.com.au

http://example.com goes to the right folder
https://example.com goes to the same

http://example.com.au goes to a different but right folder
https://example.com.au goes to https://example.com

Now I'm sure that its something to do with mod_rewrite but where I don't even know where to start looking.

Any help is GREATLY appreciated
__________________
Regards,
Steven Swarts

Last edited by sjswarts; 4th December 2012 at 02:19. Reason: Marked as solved
Reply With Quote
Sponsored Links
  #2  
Old 3rd December 2012, 09:35
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,501
Thanks: 813
Thanked 5,264 Times in 4,128 Posts
Default

The ssl protocol is IP based, so if you share the IP address of a sll site with other non ssl sites, all requests to thes other sites were redirected to the ssl site. So this is normal and not a issue with mod_rewrite.

There are two options:

1) Use a dedicated (different) IP address for the ssl site.

b) Add rewrite rules to the ssl vhost that redirect all https requests that are not for the sl site to the http version of the domain were the requests are for. I dont have a redirect code for this at hand, but I guess you should be able to find one with google or maybe someone else has one already and can post it here.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 3rd December 2012, 09:42
sjswarts sjswarts is offline
Senior Member
 
Join Date: May 2011
Location: Australia
Posts: 135
Thanks: 17
Thanked 5 Times in 5 Posts
Default

Thanks for the response Till,

So with anyone who hosts on a VPS they need to purchase an external IP for each domain that uses SSL?

As for the rewrite would have to be added to the default website? In ISPConfig?

What is the best practice here? Purchase separate IP's?
__________________
Regards,
Steven Swarts
Reply With Quote
  #4  
Old 3rd December 2012, 09:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,501
Thanks: 813
Thanked 5,264 Times in 4,128 Posts
Default

Quote:
So with anyone who hosts on a VPS they need to purchase an external IP for each domain that uses SSL?
Yes, thats part of the "standard" ssl specification, so its not specific to ispconfig. ISPCOnfig supports also SSL with SNI which is basically a shared ssl for namebased vhosts, but sni works only with latest web browsers, especially older Internet Exploerer versions cause problems. To prevent the above if you would use sbi would require to add a default ssl host similar to the default vhost for http.

Quote:
As for the rewrite would have to be added to the default website? In ISPConfig?
It has to be added in the website which has ssl enabled.

Quote:
What is the best practice here? Purchase separate IP's?
The easiest and cleanest solution wold be to purchase a separate IP address for the ssl site. But the other approach with the rewrite rules might work as well for you, I guess it mostly depends on the prices for IP addresses that you get charged.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 3rd December 2012, 09:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,501
Thanks: 813
Thanked 5,264 Times in 4,128 Posts
Default

Quote:
So with anyone who hosts on a VPS they need to purchase an external IP for each domain that uses SSL?
Yes, thats part of the "standard" ssl specification, so its not specific to ispconfig. ISPConfig supports also SSL with SNI which is basically a shared ssl for namebased vhosts, but sni works only with latest web browsers, especially older Internet Exploerer versions cause problems. To prevent the above if you would use sni would require to add a default ssl host similar to the default vhost for http.

Quote:
As for the rewrite would have to be added to the default website? In ISPConfig?
It has to be added in the website which has ssl enabled.

Quote:
What is the best practice here? Purchase separate IP's?
The easiest and cleanest solution wold be to purchase a separate IP address for the ssl site. But the other approach with the rewrite rules might work as well for you, I guess it mostly depends on the prices for IP addresses that you get charged.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.

Last edited by till; 4th December 2012 at 08:44. Reason: typos
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
sjswarts (3rd December 2012)
  #6  
Old 4th December 2012, 02:20
sjswarts sjswarts is offline
Senior Member
 
Join Date: May 2011
Location: Australia
Posts: 135
Thanks: 17
Thanked 5 Times in 5 Posts
 
Default

Is there a way to mark threads as solved ?? this will help people searching the forums.
__________________
Regards,
Steven Swarts
Reply With Quote
Reply

Bookmarks

Tags
error, ispconfig 3, mod_rewrite, ssl

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
haproxy with stunnel problem abubin Server Operation 6 10th April 2012 15:08
how do I install a SSL cert for a website? mangoo General 3 3rd February 2012 12:46
Need help with ISPConfig 3 Update midcarolina Installation/Configuration 36 8th November 2011 22:07
How to create a SSL website in ISPConfig 3? qiubosu Installation/Configuration 2 1st August 2011 02:52
Creating SSL website with Trusted SSL certificate Stown Installation/Configuration 2 12th November 2010 18:20


All times are GMT +2. The time now is 13:35.


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