Current time: 11-16-2024, 01:26 AM Hello There, Guest! (LoginRegister)


Post Reply 
[Howto] Automatic https and http for the same domain
Author Message
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #1
[Howto] Automatic https and http for the same domain
I had a request from a customer asking for a typical setup with ssl and not ssl virtualhosts
Basically in the default layout, it creates a ssl enabled folder, and the content there can ONLY be viewed under ssl.
What I did was to alter the ispcp-dmn-mngr so this folder gets created and ready to use.
The other part is to alter the apache templates, so it can serve both contents.
NOTE:
This setup will work with ONE certificate for the whole server, so there will be warnings about wrong certicates.
The ssl part is useful only if you want to have a LowCost SSL area. The other part is mostly useful so your customers can access without knowing the ip/hostname of the server.

I put together a page on the wiki explaining the details, it shoud be easy to follow, even on a already installed system.
http://www.isp-control.net/documentation...g_a_domain

Please post any problems suggestions about this in this thread.
This has been tested with 1.0.3.1 and 1.0.4 branch, it might work in older setups too, but it's not recommended.

Cheers.

UPDATE
This is the patched ispcp-dmn-mngr for 1.0.4

.txt  ispcp-dmn-mngr.txt (Size: 105.18 KB / Downloads: 73)

This is the OLD patched ispcp-dmn-mngr for 1.0.3.1

.txt  ispcp-dmn-mngr_1_0_3.txt (Size: 103.92 KB / Downloads: 6)

Notes
There used to be a patch here, but after the bind error in 1.0.3.1 (http://www.isp-control.net/forum/thread-9117.html) I updated the posted ispcp-dmn-mngr to match the stable one.
(This post was last modified: 03-09-2010 12:27 AM by aseques.)
07-20-2009 07:06 PM
Find all posts by this user Quote this message in a reply
esmiz Offline


Posts: 2
Joined: Dec 2009
Reputation: 0
Post: #2
RE: [Howto] Automatic https and http for the same domain
Hello Aseques

Do you know if would it be possible to get ssl and non ssl content in the same folder?
I mean without creating an extra folder.

Beste regards
12-11-2009 02:22 PM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #3
RE: [Howto] Automatic https and http for the same domain
(12-11-2009 02:22 PM)esmiz Wrote:  Hello Aseques

Do you know if would it be possible to get ssl and non ssl content in the same folder?
I mean without creating an extra folder.

Beste regards

I created this method to help with a migration from plesk, and this is the way it works over there.
To be able to view the content both in ssl and not ssl, it's even simpler. You should do the following:
.- Don't patch the ispcp-dmn-mngr (and so the htsdocs folder won't be created)
.- Modify the apache 443 virtualhost so it reads the content of the folder htdocs instead of htsdocs

That should work, you won't be able to restrict to ssl only for any part of the site tough.

Cheers
12-11-2009 07:22 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: [Howto] Automatic https and http for the same domain
Great mod aseques! Thanks!

Quote:That should work, you won't be able to restrict to ssl only for any part of the site tough.

Easy to do with mod_rewrite, just google for it Wink
12-15-2009 05:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
esmiz Offline


Posts: 2
Joined: Dec 2009
Reputation: 0
Post: #5
RE: [Howto] Automatic https and http for the same domain
Many thanks for the answers guys.

P.D. Hi Kilburn, Why do you have such a name? Are you from Kilburn London NW?
I lived there for 5 years some time ago
12-16-2009 04:48 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #6
RE: [Howto] Automatic https and http for the same domain
(12-16-2009 04:48 AM)esmiz Wrote:  P.D. Hi Kilburn, Why do you have such a name? Are you from Kilburn London NW?
I lived there for 5 years some time ago

No, I'm not. I chose this nick *many* years ago, before knowing that such a city existed. Despite that, I managed to go there and take some photos when I went to visit some friends from Manchester! Big Grin
12-16-2009 05:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
mwlake Offline
Junior Member
*

Posts: 18
Joined: Oct 2008
Reputation: 0
Post: #7
RE: [Howto] Automatic https and http for the same domain
Tried to apply this patch using:
/var/www/ispcp# patch -p0 -i ispcp_dmn_mngr_htsdocs.patch
result was:
patching file engine/ispcp-dmn-mngr
Hunk #1 FAILED at 1693.
1 out of 1 hunk FAILED -- saving rejects to file engine/ispcp-dmn-mngr.rej

Using: ISPCP 1.0.3-1 on Ubuntu 8.04 LTS

Any help would be appreciated
02-13-2010 02:22 AM
Visit this user's website Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #8
RE: [Howto] Automatic https and http for the same domain
(02-13-2010 02:22 AM)mwlake Wrote:  Tried to apply this patch using:
/var/www/ispcp# patch -p0 -i ispcp_dmn_mngr_htsdocs.patch
result was:
patching file engine/ispcp-dmn-mngr
Hunk #1 FAILED at 1693.
1 out of 1 hunk FAILED -- saving rejects to file engine/ispcp-dmn-mngr.rej

Using: ISPCP 1.0.3-1 on Ubuntu 8.04 LTS

Any help would be appreciated
It would help to reply you if you allowed the people to send PM to you Smile

In any case I updated the post with the already patched version.
02-13-2010 02:49 AM
Find all posts by this user Quote this message in a reply
marauder Offline


Posts: 4
Joined: Mar 2010
Reputation: 0
Post: #9
RE: [Howto] Automatic https and http for the same domain
@aseques; can update it to the new version please? Smile
03-06-2010 05:13 AM
Find all posts by this user Quote this message in a reply
merykonil Offline


Posts: 4
Joined: Feb 2010
Reputation: 0
Post: #10
RE: [Howto] Automatic https and http for the same domain
You mention that “the downside of this approach is that there will be separate cached copies for both the HTTP and HTTPS based URLs. If a vistor to your site first uses a non-secure HTTP based URL and then switches to HTTPS they would have to download fresh copies of resources that had already been accessed over HTTP.”
03-08-2010 03:52 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)