Wednesday, November 21, 2012

Setting Up SSL To Work With OsCommerce

Shared SSL Setup
Note:
If you have a free Shared SSL certificate with InMotion Hosting, this is what your URL would look like with their machine name and your username:
https://secureXX.inmotionhosting.com/~userna5
Here’s an example of what an InMotion Hosting customer would do to setup their Shared SSL to work with osCommerce:
Locate your configure.php file, which could be found at:
/public_html/cart/includes/configure.php
Specifically, you’ll want to pay attention to these lines:
1
2
3
4
5
define('HTTP_SERVER', 'http://yourdomain.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://secureXX.inmotionhosting.com/~userna5'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', true); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'yourdomain.com');
define('HTTPS_COOKIE_DOMAIN', 'secureXX.inmotionhosting.com/~userna5');
You’ll need to modify the HTTPS_SERVER, HTTPS_COOKIE_DOMAIN, and ENABLE_SSL fields with your account information. The format is as follows:
https://secureXX.inmotionhosting.com/~userna5
“secureXX” will represent the server your account is located on, so you will need to make sure the server number is correct. If you are not sure, please refer to your Welcome Email or contact InMotion Hosting’s support department.
“userna5″ will represent your InMotion account username. Once this information is saved, your cart will switch to the SSL server whenever a customer logs in or goes to checkout.

Dedicated SSL Setup
Dedicated SSL certificates are set up the same as the shared, except that you only use your actual domain name instead of the machine name since a Dedicated SSL certificate shows your domain in the address bar:
1
2
3
4
5
define('HTTP_SERVER', 'http://yourdomain.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://yourdomain.com'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', true); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'yourdomain.com');
define('HTTPS_COOKIE_DOMAIN', 'yourdomain.com');

1 comment:

  1. Thanks. I also getting this kind of problem which really helpful for me from this post.
    osCommerce hosting

    ReplyDelete