If this is your first visit, check our documentation. To post, register or login.
Forums / Business Issues / Fraud Prevention / How to install and configure SSL - a shared experience

How to install and configure SSL - a shared experience

Locked

Started by frank18 on 1 Feb 2010, 9:06 AM · Views: 547

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
1 Feb 2010, 9:06 AM
#1
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Post #1 by frank18

After spending countless hours researching the forums (ZC and others) and finding posts scattered all over the place, in no logical order and resemblance, I decided to start this thread and hopefully (with the approval of the moderators / devs) make it the official "SSL - How To" thread.

The idea is that fellow zenners will share their experience about their own installations of SSL certs so others are getting the chance to learn without spending lots of time going in and out of posts and having to conduct umpteen searches. It should take some workload off the devs and other experienced zenners.

Firstly please read the official tutorial https://www.zen-cart.com/tutorials/index.php?article=14

Be careful though not to post any sensitive information (ie passwords, login details etc etc) for obvious reasons.

So here we go:

SSL INSTALLATION INTO SUBDOMAIN USING CPANEL

My experience is with an SSL cert installation into a store in the subdomain https://www.zencart.frnt.org using cPanel Version 11.24.5-STABLE on an Apache server.

The store (1.3.7.1) has been in ops for more than 2 years now.

STEP 1

If your store is installed in a directory https://www.yourdomain.com/yourstore you need to check if you can reach it by typing https://www.yourstore.yourdomain.com into the address bar of your browser. This may or may not work.

If it does not work then go to your cpanel and create the subdomain https://www.yourstore.yourdomain.com

If it does work, then there still is no guarantee that you can make the domain https://www.yourstore.yourdomain.com your nominated secure domain.

Bottom line: make sure the subdomain https://www.yourstore.yourdomain.com actually exists in cPanel. If it does not exist then create it. It makes no difference to your existing file structure https://www.yourdomain.com/yourstore . Creating this subdomain in cPanel merely creates a pointer within your virtual environment.

STEP 2

Login to cPanel and navigate to SSL/TLS Manager.

Click the link "Create Private Key" (or similar). I am assuming that you don't have a Private Key already. Look for "Generate a New Key" at the bottom of the page. In the Host box type in https://www.yourstore.yourdomain.com , select the key size (1024 or 2048) then click "Generate". The key is automatically created and is unique. Copy the key and save it on your HDD. You will need this key later when ordering your cert.

STEP 3

Still in cPanel go back to SSL/TLS Manager and look for the link "Certificate Signing Requests (CSR)". Under Host Name enter
https://www.yourstore.yourdomain.com

Enter 2 letters for country code (in my case AU for Australia) and 3 letters for state (3 because Aussie uses 3 letters, in my case QLD for Queensland)

The next 3 boxes are self explanatory.

Now to email: it is best to enter an email address like [email protected] or [email protected] or [email protected] as this domain specific email address may be needed to verify that you are owner / nominated administrator of the domain. If you don't have an email address like this then create one in cPanel.

Pass Phrase: enter any combination of letters and numbers but no characters like +-/_= etc (I have learned this the hard way...)

Click "Generate", copy and save the code on your HDD. You will need this key later when ordering your cert.

STEP 4

Buy your certificate. Go shopping around the web. The price differences for exactly the same certificate issued by exactly the same company (GeoTrust, Trustico, VeriSign) are enormous. I bought mine from the Aussie branch of Trustico (no affiliation exists here...)

During the registration process you will be asked to paste your Private Key and your CSR into various boxes on the relevant site. If you get errors (i.e. key not accepted) then most likely it is corrupted because of some extra line breaks etc. Just go back to your cPanel and copy the key again, then paste it straight into the box at the seller's site.

Depending on the seller's site, from here it can go any path (not really the point of this exercise)

STEP 5

Once you receive your certificate by email, go back to cPanel, click on SSL/TLS Manager, click on "Certificates (CRT)" and upload or copy/paste the key into the box.

STEP 6

Still in SSL/TLS Manager, click on "Order SSL Installation". My host Webcity charges a fee for the installation and assignment of a new IP for the secure subdomain. I requested the installation late on a Friday afternoon and the installation (server side) was done in 2 hours. It then takes about 24-48 hours before the new IP address propagates through the DNS. Until that has happened you won't be able to do any configuration / testing on your ZC installation.

STEP 7

Test to see if you can actually reach your secure domain https://www.yourstore.yourdomain.com

Be prepared to see a "bare bone" page (i.e. just words but no formatting) at this stage when you check the accessibility. This happens because you haven't changed your configure.php files yet.

If you still can't reach your https:// url 48 hours after the installation of your certificate then contact your host.

If you can reach your secure domain then go to step 8.

STEP 8

My next step was to implement the configuration changes in includes/configure.php and YOUR_ADMIN_NAME/includes/configure.php as per the tutorial at https://www.zen-cart.com/tutorials/index.php?article=14

This is how I interpreted it:

My settings in includes/configure.php were changed to:

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
define('HTTP_SERVER', 'http://www.frnt.org');
define('HTTPS_SERVER', 'https://www.zencart.frnt.org');

// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/zencart/');
define('DIR_WS_HTTPS_CATALOG', '/');

and the corresponding admin/includes/configure.php changed to

define('HTTP_SERVER', 'http://www.frnt.org');
define('HTTPS_SERVER', 'https://www.zencart.frnt.org');
define('HTTP_CATALOG_SERVER', 'http://www.frnt.org');
define('HTTPS_CATALOG_SERVER', 'https://www.zencart.frnt.org');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'true');
define('ENABLE_SSL_ADMIN', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/zencart/MY_ADMIN_NAME/');
define('DIR_WS_CATALOG', '/zencart/');
define('DIR_WS_HTTPS_ADMIN', '/MY_ADMIN_NAME/');
define('DIR_WS_HTTPS_CATALOG', '/');

This worked first-up without a single glitch. The site was only "down for maintenance" a mere 20mins.

Using my settings and accessing https://www.frnt.org/zencart you will go to an unsecured site. Once you get to
https://www.frnt.org/zencart/index.php?main_page=login the configuration automatically switches to secure mode and stays in secure mode for the entire checkout process - including all intermediate steps.

ZC is smart enough to recognize that it needs to go into secure mode once the customer reaches an area where sensitive information like login details, passwords, preferences etc are being entered.

Anyone trying to access https://www.zencart.frnt.org immediately enters and always stays in a secure environment - full stop.

Best of all: There was no need to copy my existing ZC files into a new secure directory.

IN CLOSING

This post only applies to a cPanel installation with a configuration as described above.

Hope this helps anyone else.

Please post your experiences with SSL installations in different environments so all concerned can learn something.

If I have missed something please let me know.

My second store https://www.personalnaturals.frnt.org is next in line to be secured - just the same way as the above.

Frank

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

11 Feb 2010, 4:12 AM
#2
weebler avatar

weebler

New Zenner

Join Date:
Jan 2010
Posts:
2
Plugin Contributions:
0

Post #2 by weebler

Hooozahhh!:clap:

18 Feb 2010, 5:49 PM
#3
outlander avatar

outlander

New Zenner

Join Date:
Dec 2009
Location:
Metro Denver, CO
Posts:
19
Plugin Contributions:
0

Post #3 by outlander

frank18,

That is pretty much the way it worked for me, but there was still one little hitch that I am having a hard time correcting. Once in the secure area none of the images show up, but if I right click on the place holder and open the image in a new tab or window they will display within the https: structure as an individual image.

I have cleared cache many times thinking that might be it.

I'm befuzzeled :frusty:, any ideas?

Fred

18 Feb 2010, 6:25 PM
#4
outlander avatar

outlander

New Zenner

Join Date:
Dec 2009
Location:
Metro Denver, CO
Posts:
19
Plugin Contributions:
0

Post #4 by outlander

OK, got the issue resolved.:clap:

If it happens to you, check you HotLink Protection settings if you are using cPanel or another site manager. Be sure that you have the https://yourstore.com listed in the "Allowed Referrers" section.

Fred

19 Feb 2010, 2:11 AM
#5
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Post #5 by frank18

If it happens to you, check you HotLink Protection settings if you are using cPanel or another site manager. Be sure that you have the https://yourstore.com listed in the "Allowed Referrers" section.

very good point - something to add to my "knowledge base":smile:

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

22 Feb 2010, 9:20 PM
#6
rasabeh avatar

rasabeh

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

Post #6 by rasabeh

I just followed the steps of the tutorial, i.e. modifying the configure files, and now when I try to test checkout I cannot login into my test account. I'll enter the email address (which is the user name) but it will not accept the password. I even created a new account because I thought it was my error but it won't let the new account login in either.

modified includes file:

define('HTTP_SERVER', 'http://www.healthybargains.net');

define('HTTPS_SERVER', 'https://www.healthybargains.net');

// Use secure webserver for checkout procedure?

define('ENABLE_SSL', 'true');

modified admin/includes file:

define('HTTP_SERVER', 'http://www.healthybargains.net');

define('HTTPS_SERVER', 'https://www.healthybargains.net');

define('HTTP_CATALOG_SERVER', 'http://www.healthybargains.net');

define('HTTPS_CATALOG_SERVER', 'https://www.healthybargains.net');

// Use secure webserver for catalog module and/or admin areas?

define('ENABLE_SSL_CATALOG', 'true');

define('ENABLE_SSL_ADMIN', 'true');

Can someone please tell me what I did wrong? Also, this IS a Template Monster template sigh so I'm wondering if that has something to do with it? It shouldn't though, right?

the website in question :www.healthybargains.net

22 Feb 2010, 10:36 PM
#7
rasabeh avatar

rasabeh

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

Post #7 by rasabeh

And now I try to log into the admin panel and it has replaced the username and password that used to be there with the email of the new test account I created earlier. I cannot login with my previous info, which had worked fine before I enabled the SSL cert.

If this is the wrong thread to post this issue in I'll be happy to move it the right thread - just let me know where. Thanks

22 Feb 2010, 10:50 PM
#8
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Post #8 by frank18

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/zencart/MY_ADMIN_NAME/');
define('DIR_WS_CATALOG', '/zencart/');
define('DIR_WS_HTTPS_ADMIN', '/MY_ADMIN_NAME/');
define('DIR_WS_HTTPS_CATALOG', '/');

  1. have you changed** these lines**?

  2. if you did and you are still having problems then activate the 'classic' template thus eliminating the 'Template Monster' template.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

22 Feb 2010, 11:09 PM
#9
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Post #9 by frank18

I just clicked on the 'Login' link at your site. This page should return https:// in the address bar but it does not.

Carefully read again STEP 8 in post #1 of this thread and follow the instructions line by line.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

23 Feb 2010, 8:10 AM
#10
rasabeh avatar

rasabeh

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

Post #10 by rasabeh

I have not changed those lines since I renamed the admin file and they were named correctly.

I'm pretty sure this is a template issue since no one else seems to be having this problem so I've submitted a ticket to their support dept.

Thanks for your help!

2 Jan 2011, 3:36 PM
#11
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,023
Plugin Contributions:
2

Post #11 by dw08gm

Hi Frank18

Thanks for creating this thread. In creating an SSL cert

...Step 3...The next 3 boxes are self explanatory....

Now my CSR has four boxes requesting company, company division, email and pass phrase - all of which require input.

However I do not wish to input my company name, but rather leave it blank, or vague with fullstops or spacebars, or at most only the core name of the website, ie minus the www and .com parts. And then for company division - Sales.

I would like to know what others have done with the company input and thoughts upon whether my proposals would be acceptable? At this stage, I am not interested in SSL insurance.