Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can an SSL certificate be shared


netmaker

Recommended Posts

I have search the forum to see if this has been asked before, but cant find it.

 

I have an SSL certificate on my domain (https://www.domain.com)

 

Can I setup two versions of OSC runnign different shops on;

 

 

www.domain.com/shop1

www.domain.com/shop2

 

and result in them both secure?

 

I have tried but the configure.php file gives me lots of errors when I try to setup the entries.

 

Am I trying the impossible?

 

Thanks in advance

 

Paul

Link to comment
Share on other sites

I don't see why it wouldn't work. All the certificate cares about is the TLD (the www.domain.com) not what's beneath it.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

The two configuration files for the two shops are;

 

define('HTTP_SERVER', 'http://www.healthyandessential.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.healthyandessential.com'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'www.healthyandessential.com');

define('HTTPS_COOKIE_DOMAIN', 'www.healthyandessential.com');

define('HTTP_COOKIE_PATH', '/shop/');

define('HTTPS_COOKIE_PATH', '/shop/');

define('DIR_WS_HTTP_CATALOG', '/shop/');

define('DIR_WS_HTTPS_CATALOG', '/shop/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'

 

 

 

AND

 

define('HTTP_SERVER', 'http://www.healthyandessential.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.healthyandessential.com'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'www.healthyandessential.com');

define('HTTPS_COOKIE_DOMAIN', 'www.healthyandessential.com');

define('HTTP_COOKIE_PATH', '/healthie/');

define('HTTPS_COOKIE_PATH', 'healthyie');

define('DIR_WS_HTTP_CATALOG', '/healthie/');

define('DIR_WS_HTTPS_CATALOG', 'healthyie');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

First shops works OK, but second one give me errors only AFTER I add the secure settings. Works OK until I change the configuration file

 

Any thoughts ?

 

Paul

Link to comment
Share on other sites

You may have to set up the config files in a slightly unusual way.

 

ie:

 

define('HTTP_SERVER', 'www.domain.com/shop1');

define('HTTPS_SERVER', 'www.domain.com/shop1'); /

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'www.domain.com/shop1');

define('HTTPS_COOKIE_DOMAIN', 'www.domain.com/shop1');

 

define('HTTP_SERVER', 'www.domain.com/shop2');

define('HTTPS_SERVER', 'www.domain.com/shop2'); /

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'www.domain.com/shop2');

define('HTTPS_COOKIE_DOMAIN', 'www.domain.com/shop2')

 

Then abbreviate the paths to just '/'

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Just think about it for a while and think about how the s/w builds the paths to the various directories. It's quite simple. You just want to make sure that you have unique urls and cookies for each shop.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Interesting - both shop give the same error when changing the configure.php as suggested

 

Fatal error: Call to undefined function: tep_output_warning() in /var/www/html/shop/includes/header.php on line 32

 

any thought ?

 

Cheers

 

Paul

Link to comment
Share on other sites

Wouldn't you add the shop-specific path in DIR_WS_HTTP_CATALOG, etc? You would also want to change the cookie paths.

I think the whole trick is to make sure that the <base href="http://www.domain.com/shop1/">

etc. is unique for each shop.

 

There's probably more than one combination that will work.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

You have errors in your configure.php file for the second shop. I think you want:

 

define('HTTP_COOKIE_PATH', '/healthie/');
define('HTTPS_COOKIE_PATH', '/healthie/');
define('DIR_WS_HTTP_CATALOG', '/healthie/');
define('DIR_WS_HTTPS_CATALOG', '/healthie/');

Link to comment
Share on other sites

Interesting - both shop give the same error when changing the configure.php as suggested

 

Fatal error: Call to undefined function: tep_output_warning() in /var/www/html/shop/includes/header.php on line 32

 

any thought ?

 

Cheers

 

Paul

Did you change the define('DIR_FS_CATALOG' for each store?

 

You may have to explicitly define all the paths in the config files, no calculated paths, but I'm pretty sure you'll be able to make it work.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

When I set the configure.php file back as it was on both shops, I still get the same error displayed on the screen

 

Fatal error: Call to undefined function: tep_output_warning() in /var/www/html/shop/includes/header.php on line 32

 

Does the configure.php affect any other file that needs to be re-set ?

 

Thanks

 

Paul

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...