这篇文章很好,先看完了就摘录过来!原文题目叫做How do I enable SSL after I have installed Zen Cart? 大意是安装好zen cart 后需要做的工作使zen cart 能正常运行。否则admin后台也许都无法登陆。

文章正文:

1. Make sure SSL is working on your account first
FIRST, make sure you’ve got SSL enabled on your hosting account. Work with your hosting company to get a certificate installed and to purchase one if necessary.

Can you get to “https://www.your_site.com” ? If not, ask your hosting company how to do it. If you can’t access your site using an HTTPS:// address, don’t try to enable SSL in Zen Cart or you’ll just end up with broken pages in your store!!!(这个文章是摘自一个主机商的,不过我们自己的话是要安装好apache+php+mysql+curl+ssl等配置后就可以完成这一步)

2. Enable SSL support in Zen Cart(使zen cart 支持ssl安全连接)
Once you’ve had your hosting company install your SSL certificate, and you have confirmed that going to “https://your_site.com” actually works without an error, you can turn on SSL support in Zen Cart using the following information:

    Different servers may have slightly different setups and the configuration also depends on whether you have your own certificate or are using a shared certificate. We will give some examples of the most common combinations. You will need to make changes in both the includes/ configure.php and admin/ includes/ configure.php. You may have to load the whole catalog into an HTTPS directory also. Please consult your host for the URL you will need.

3、Your Own Certificate
Change includes/configure.php and admin/includes/configure.php to:

// Define the webserver and path parameters
define(‘HTTP_SERVER’, ‘http://www.YOUR_SHOP.com’);
define(‘HTTPS_SERVER’, ‘https://www.YOUR_SHOP.com’);
define(‘ENABLE_SSL’, ‘true’);

Shared Certificate
Change includes/configure.php and admin/includes/configure.php to:

// Define the webserver and path parameters
define(‘HTTP_SERVER’, ‘http://www.YOUR_SHOP.com’);
define(‘HTTPS_SERVER’, ‘https://YOUR_SHOP.YOUR_SECURE_SERVER.net’);
define(‘ENABLE_SSL’, ‘true’);

or:

// Define the webserver and path parameters
define(‘HTTP_SERVER’, ‘http://www.YOUR_SHOP.com’);
define(‘HTTPS_SERVER’, ‘https://YOUR_SECURE_SERVER.net/YOUR_USERNAME’);
define(‘ENABLE_SSL’, ‘true’);

or:

// Define the webserver and path parameters
define(‘HTTP_SERVER’, ‘http://www.YOUR_SHOP.com’);
define(‘HTTPS_SERVER’, ‘https://YOUR_SECURE_SERVER.net/~YOUR_USERNAME’);
define(‘ENABLE_SSL’, ‘true’);

NOTE: As of v1.3.x, the Admin area can only secure the “login” page via SSL unless you set the HTTP_SERVER in your “admin/includes/configure.php” to an SSL URL, in which case the entire admin area will be treated as SSL rather than only selected relevant pages. This will be changing during the admin-rewrite phase scheduled for completion sometime after Zen Cart v2.0 is released.