Zen Cart Logo
Forums / Basic Configuration / SSL suggestion

SSL suggestion

Views: 33,504

Results 1 to 20 of 32
18 May 2016, 1:15 PM
#1
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

SSL suggestion

Hi,
may be these are dumb questions but I really can't find proper answers around.
I have v1.5.4 with ssl configured.
SSL works and gets activated when logging in or checking out but is not active when browsing.

I see many sites that are automatically redirect to https even at the home page.

The questions are:

  1. Is it better for some reason (and if so why) to run under https starting from home page?
  2. To activate https immediately when accessing the site should I mod the includes/configure.php so that
    define('HTTP_SERVER', 'http://www.mysite.it');
    reads
    define('HTTP_SERVER', 'https://www.mysite.it');
  3. If I apply what in point 2) would this have any consequence aboutn google indexing and or adwords google merchant settings?

Thanks.
ciao from Italy
enzo

18 May 2016, 5:09 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: SSL suggestion

There is actually no reason that I can think of for your site to be under SSL the whole time as only sensitive information requires encryption and ZenCart is smart enough to envoke it when required

But the answer to your question of "How" is correct

define('HTTP_SERVER', 'https://www.mysite.it');

Will cause your site to be under SSL the whole time

18 May 2016, 8:46 PM
#3
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

This is exactlywhat I thought.
Thanks

20 May 2016, 3:53 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: SSL suggestion

Nevertheless, some search engines, including the big G, give better search-result ranking to sites which are entirely SSL.

If you want to make your site run entirely under SSL, there are two pieces to that:

a) Zen Cart side:

  • HTTP_SERVER should use your https:// address instead of an http:// address
  • ENABLE_SSL should be set to 'false' (because ENABLE_SSL is only set to 'true' when you want ZC to switch back and forth between http and https for certain secured pages)
    *NOTE: Some people have reported that setting ENABLE_SSL to 'false' in this case may cause confusion to some payment module configurations which expect SSL and rely on the ENABLE_SSL setting to confirm it. Thus, in some cases it may still be wise to leave ENABLE_SSL set to 'true' even when using https on all pages.

b) Server side:
You might want to also make some Apache configurations to redirect any non-SSL URLs to the SSL equivalent. Often this is done in .htaccess. Consult your hosting company for the best way to do this on your particular server. (There are lots of possible approaches posted all over the internet, but your hosting company knows the best way for your particular server.)

20 May 2016, 11:45 PM
#5
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

WOW!
Thank a lot!
Ciao from Italy

20 May 2016, 11:57 PM
#6
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

I did it, and I added this to the .htaccess

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]

It seems to work prefectly.
May be is too much, but I pay for the ssl so why not use it?
Thanks again.
ciao from Italy
enzo

21 May 2016, 2:41 PM
#7
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

I found a little problem with ssl on admin.
CKEDITOR is not loaded, whle HTML area is.
How can I fix this?
I can use HTML area, but I am used to ckeditor, so....

21 May 2016, 2:55 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: SSL suggestion

What is in your 2 configure.php files?

22 May 2016, 12:34 AM
#9
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

Here they are.
Thanks
enzo

/*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. /
/
**** The 2 files should be kept separate and not used to overwrite each other. ***********/

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
define('HTTP_SERVER', 'https://www.mysite.it');
define('HTTPS_SERVER', 'https://www.mysite.it');
define('HTTP_SERVER_ALTERNATIVE', 'http://www.m.mysite.it');
define('HTTPS_SERVER_ALTERNATIVE', 'https://www.m.mysite.it');
// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');

/*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. /
/
**** The 2 files should be kept separate and not used to overwrite each other. ***********/

/**

  • WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
  • To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
    */
    define('HTTP_SERVER', 'https://www.mysite.it');
    define('HTTPS_SERVER', 'https://www.mysite.it');
    define('HTTP_CATALOG_SERVER', 'https://www.mysite.it');
    define('HTTPS_CATALOG_SERVER', 'https://www.mysite.it');

// secure webserver for admin? Valid choices are 'true' or 'false' (including quotes).
define('ENABLE_SSL_ADMIN', 'true');

// secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes).
define('ENABLE_SSL_CATALOG', 'true');

22 May 2016, 3:18 AM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: SSL suggestion

What about the rest of these files??

And where did these come from??

define('HTTP_SERVER_ALTERNATIVE', 'http://www.m.mysite.it');
define('HTTPS_SERVER_ALTERNATIVE', 'https://www.m.mysite.it');

22 May 2016, 4:39 AM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SSL suggestion

Further I thought DrByte suggested turning off the ENABLE_SSL_ settings, which you've currently only done at this point on the catalog side.

22 May 2016, 10:06 AM
#12
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

If you tell me what you want to see it is easyer.
The lines you quoted are there because of google.
They will disappera as soon as I will switch to 1.5.5 responsive.
However they have nothing to do with ssl and the admin side.
Ciao

22 May 2016, 10:20 AM
#13
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

Further I thought DrByte suggested turning off the ENABLE_SSL_ settings, which you've currently only done at this point on the catalog side.
Thanks.
I did not realize that DrByte suggested to do it also on the admin config. I did it now, but nothing changed. CKEDITOR still does not get loaded, while HTMLAREA does.
In my opinion is a matter of configuration on CKEDITOR, but I have no idea of how to change it.
ciao
enzo

22 May 2016, 11:32 AM
#14
soxophoneplayer avatar

soxophoneplayer

Totally Zenned

Join Date:
Feb 2008
Posts:
534
Plugin Contributions:
0

Re: SSL suggestion

enzo-ita:

I did it, and I added this to the .htaccess

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]

Which .htaccess file did you put this in?

22 May 2016, 2:22 PM
#15
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

soxophoneplayer:

Which .htaccess file did you put this in?
The one in the Root

23 May 2016, 4:44 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: SSL suggestion

enzo-ita:

I found a little problem with ssl on admin.
CKEDITOR is not loaded, whle HTML area is.
How can I fix this?
I can use HTML area, but I am used to ckeditor, so....
I've never had an SSL problem with using CKEditor.
Perhaps you're missing some language files for your CKEditor or it didn't fully upload to your server?

23 May 2016, 8:24 AM
#17
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

DrByte:

I've never had an SSL problem with using CKEditor.
Perhaps you're missing some language files for your CKEditor or it didn't fully upload to your server?
It did work perfectly before switching to ssl.
If I do not use ssl it start working again.
:dontgetit
ciao
P.S: I switched to english langiage in admin but nothing changes.

24 May 2016, 3:50 AM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: SSL suggestion

Use your browser's javascript console to look at what errors javascript is encountering. Also use the browser's error-reporting to see what errors it's encountering related to SSL on those pages. Those will give you clues about how to fix whatever is not loading properly and why.

24 May 2016, 8:16 AM
#19
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: SSL suggestion

Thank again for your help.
This is what happened.
I used the console and found that the php handler was giving errors. (ckeditor.php)
I uploaded the handler from 1.5.4. but nothing changed.
Always using the console, I then found another error in the ckeditor.js
Uploaded ckeditor.js from 1.5.4
Nothing changed, but it got even worse because also the editor's frame disappeared and ckeditor did not work anymore even without ssl.
Uploaded from a back up on one day before the whole editor folder and magically both editors started working again with ssl active.
Probably the problem was a corrupted file, but:
It sounds very strange to me that the file got corrupted right after setting ssl for the admin.
It sound even strange that the file corruption interested only the ssl setting and not the plain setting given that it did work perfectly switching form ssl to plain.
Software mistery....:shocking:
P.S. While typing my brain was knocking at me and I realized that it could be a cache problem. I can not tell exactly but I am shure I cleaned the cache at a point in the process above, but I am also sure I cleaned it even before starting using the console.
Opinions welcome!!!!
Ciao from Italy
enzo

24 May 2016, 2:26 PM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: SSL suggestion

Thanks for reporting back that re-uploading the plugin's files resolved the problem.