
3rd December 2012, 09:03
|
|
Senior Member
|
|
Join Date: May 2011
Location: Australia
Posts: 107
Thanks: 16
Thanked 5 Times in 5 Posts
|
|
(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
|

3rd December 2012, 09:35
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,903
Thanks: 693
Thanked 4,195 Times in 3,212 Posts
|
|
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.
|

3rd December 2012, 09:42
|
|
Senior Member
|
|
Join Date: May 2011
Location: Australia
Posts: 107
Thanks: 16
Thanked 5 Times in 5 Posts
|
|
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
|

3rd December 2012, 09:47
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,903
Thanks: 693
Thanked 4,195 Times in 3,212 Posts
|
|
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.
|

3rd December 2012, 09:47
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,903
Thanks: 693
Thanked 4,195 Times in 3,212 Posts
|
|
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.
Last edited by till; 4th December 2012 at 08:44.
Reason: typos
|
|
The Following User Says Thank You to till For This Useful Post:
|
|

4th December 2012, 02:20
|
|
Senior Member
|
|
Join Date: May 2011
Location: Australia
Posts: 107
Thanks: 16
Thanked 5 Times in 5 Posts
|
|
Is there a way to mark threads as solved ?? this will help people searching the forums.
__________________
Regards,
Steven Swarts
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 03:27.
|
|
Recent comments
21 hours 39 min ago
1 day 4 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 18 hours ago
2 days 3 hours ago
2 days 4 hours ago
2 days 8 hours ago
2 days 12 hours ago
2 days 12 hours ago