Jump to content

https / ssl in a shared hosting environment with a private html or secure htdocs folder


uddhava

Recommended Posts

I searched the forum and couldnt find an answer, although some have asked the question before.
My hosting provider does provide ssl and i have installed a certificate & key succesfully. But here is the thing.
The provider uses a seperate folder on the server for the secure content. So i have:
* public_html
* private_html

Obviously this will not work for Prestashop who will do its own redirecting and expects https & http content in the same location. I inquired from my provider for a solution, but is there anybody who has tackled this problem already?
Maybe i could copy the whole site to the private folder, or will that mess up the tokens/cookies ???

ys

Link to comment
Share on other sites

I think i found a piece of the solution. My hosting provider is using DirectAdmin to take care of the shared hosting server. And on the DirectAdmin forum i found this advice :

You can symlink it via the domain setup link then click on the domain.

private_html setup for demo.com - (SSL must be enabled above)
--Use a directory named private_html
--Use a symbolic link from private_html to public_html - allows for same data in http and https


You can read more about here :
http://www.directadmin.com/forum/showthread.php?t=29793&highlight=private_html+http+https
http://www.directadmin.com/forum/showthread.php?t=7461&highlight=https+private_html

Now for users who have Plesk or cPanel it might be different, but maybe those forums might give an answer also
Link to comment
Share on other sites

I managed (well actually my provider) to get the https working on the shared hosting that i have.
Even installed the correct certificates and keys in DirectAdmin.
I will post the changes from the provider later so you know what to change (or have it changed)

If you have with DirectAdmin and want SSL/https working you need to have :
- fixed IP address
- Certificates and private keys
- Symbolic linked private_html folder

With a fixed IP address, DirectAdmin will never allow you to setup SSL. So you need to get a fixed IP from your provider.
The certificates you need are :
- private key
- ssl certificate
- CA (intermediate) certificate

The symbolic link has to be made by your provider. They can use the links from my previous post.

Link to comment
Share on other sites

  • 4 months later...

If you use a free SSL service like www.startssl.com you will need these keys / certificates for Directadmin :

Your private key : Encrypted RSA certificate
SSL Certificate
CA (intermediate) certificate : also called Class 1 Intermediate Server CA (filename sub.class1.server.ca.car)

In the SSL directadmin page you can add your keys :
* Choose the option "Paste a pre-generated certificate and key"
* Paste your DECRYPTED RSA key + the SSL Certificate directly under each other.

If you only have a Encrypted RSA certificate (when you apply for a private key on startssl.com) then you need to decrypt it.
You can do this on your local server (with ssh access) or you can do it through the startssl.com website in the toolbox > "Decrypt Private Key"

Then on the bottom of the SSL page in Directadmin there is an option to paste the CA root certificate :
"Click Here to paste a CA Root Certificate"
Use that to add the CA certificate.

Link to comment
Share on other sites

  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...