Andydread Posted December 6, 2004 Posted December 6, 2004 Hi I installed oscommerce 2.2 and it is working beautifully on one server without SSL. however I need to enable SSL and this is the problem. The https server is different host alltogether so how do I set this up on two hosts. the http server is http://www.mydomain.com and the https server is https://secure.myisp.com/mydomain Everything works if ssl is disabled when I enable SSL it fails I have copied the /catalog folder to the secure server but I get database connect messages when i connect to the ssl site. Do i need to have a seperate database running on the https server also ? Also. Do i have to modify the configure.php files on the secure.myisp.site to reflect the local paths of that server I modified the configure.php on the https server to point to the database on the http server and I get permission denied because it is trying to log in with [email protected] instead of [email protected] here is my the database section in my configure.php files on the HTTPS server. ============================= // define our database connection define('DB_SERVER', 'www.mydomain.com'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'sqluser'); define('DB_SERVER_PASSWORD', 'mypassword'); define('DB_DATABASE', 'mydatabase'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ======================== and here it is the working one on the HTTP server -------------------- // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'sqluser'); define('DB_SERVER_PASSWORD', 'mypassword'); define('DB_DATABASE', 'mydatabase'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ----------------------------- So basically i just want to know how do you run this on two seperate hosts. one http and one https. Do i need two catalog folders? and two databases? if so how do i keep all this syncronized. Thanks
Guest Posted December 6, 2004 Posted December 6, 2004 we dont need to know the db info, we need the rest of the configure.php file to help you with that aspect of it. post the top portion of your includes/configure.php along with the exact path your host gave you for your shared ssl
♥Vger Posted December 6, 2004 Posted December 6, 2004 The https server is different host alltogether so how do I set this up on two hosts. Do you mean that it is two different hosting companies completely? Or is it that you are talking about using the shared ssl provided by your hosting company? If it is a different hosting company completely, then forget the whole idea is the best advice anyone can give you. Vger
Andydread Posted December 6, 2004 Author Posted December 6, 2004 Do you mean that it is two different hosting companies completely? Or is it that you are talking about using the shared ssl provided by your hosting company? If it is a different hosting company completely, then forget the whole idea is the best advice anyone can give you. Vger <{POST_SNAPBACK}> Its the same hosting company just different physical servers here is my catalog/includes/configure.php file on the HTTP server // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://www.bentleygardens.com'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://secure.emgrp.com/bentley/'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.bentleygardens.com'); define('HTTPS_COOKIE_DOMAIN', 'secure.emgrp.com'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); 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/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/opt/server/docs/bentleygardens/www/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); And this is the one on the HTTPS server define('HTTP_SERVER', 'http://www.bentleygardens.com'); // eg, http://localhost - should not be empty for prod uctive servers define('HTTPS_SERVER', 'https://secure.emgrp.com/bentley/catalog/'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.bentleygardens.com'); define('HTTPS_COOKIE_DOMAIN', 'secure.emgrp.com'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); 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/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/opt/server/docs/bentleygardens/www/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); note ** The local directory locations for the catalog are different on both servers. Thanks
Guest Posted December 6, 2004 Posted December 6, 2004 In line: define('HTTPS_SERVER', 'https://secure.emgrp.com/bentley/'); you have an extra slash at the end.
Guest Posted December 6, 2004 Posted December 6, 2004 this: define('HTTPS_SERVER', 'https://secure.emgrp.com/bentley/'); to this: define('HTTPS_SERVER', 'https://secure.emgrp.com/bentley');
Andydread Posted December 6, 2004 Author Posted December 6, 2004 this:define('HTTPS_SERVER', 'https://secure.emgrp.com/bentley/'); to this: define('HTTPS_SERVER', 'https://secure.emgrp.com/bentley'); <{POST_SNAPBACK}> Thanks that works now i get a database connect error so we are moving in the right direction the error is 1046 - No Database Selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] when i turn ssl off all works ok.
Andydread Posted December 6, 2004 Author Posted December 6, 2004 OK i got it working so far. Thanks a lot for all the help. I had to add a database user for the secure host and change the DB_SERVER setting from localhost to the server hostname. Now how do I get the admin page to work with the current SSL setup? when I go to the https://secure.myisp.com/catalog/admin url i get the admin page but when i click a link it leaves the https url an goes to the http://www.mysite.com/catalog/admin url It also says that I am not protected by ssl even though it shows I have a https connection to the admin page. Here is my admin file on the HTTP server =========================== // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://www.bentleygardens.com'); // eg, http://localhost - should not be empty for productive servers define('HTTP_CATALOG_SERVER', 'http://www.bentleygardens.com'); define('HTTPS_CATALOG_SERVER', 'https://secure.emgrp.com/bentley/catalog'); define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/opt/server/docs/bentleygardens/www/catalog/'); // where the pages are located on the server define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required define('DIR_FS_ADMIN', '/opt/server/docs/bentleygardens/www/catalog/admin/'); // absolute pate required define('DIR_WS_CATALOG', '/catalog/'); // absolute path required define('DIR_FS_CATALOG', '/opt/server/docs/bentleygardens/www/catalog/'); // absolute path required define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); 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/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); Here is the admin/includes/configure.php on the HTTPS server ------------------------------------------------------- // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://www.bentleygardens.com'); // eg, http://localhost - should not be empty for prod uctive servers define('HTTP_CATALOG_SERVER', 'http://www.bentleygardens.com'); define('HTTPS_CATALOG_SERVER', 'https://secure.emgrp.com/bentley/catalog'); define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/opt/server/docs/bentleygardens/www/catalog/'); // where the pages are located on the server define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required define('DIR_FS_ADMIN', '/opt/server/docs/bentleygardens/www/catalog/admin/'); // absolute pate required define('DIR_WS_CATALOG', '/catalog/'); // absolute path required define('DIR_FS_CATALOG', '/opt/server/docs/bentleygardens/www/catalog/'); // absolute path required define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); 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/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); Thanks Andy
Guest Posted December 6, 2004 Posted December 6, 2004 change the http_server reference, where you have http://domain to the https://domain/bentley
fisherofman Posted December 6, 2004 Posted December 6, 2004 so if i change the reference and copy the dir it should change the links? and your refering to this reference define('HTTPS_SERVER', 'https://www.mydomian.com'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure?
Andydread Posted December 6, 2004 Author Posted December 6, 2004 change the http_server reference, where you have http://domain to the https://domain/bentley <{POST_SNAPBACK}> Ok that works, thanks to all that helped. I changed this in admin/includes/config on the HTTPS server and it works now. Thanks. you people are great.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.