Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ssl for admin site


ideatek

Recommended Posts

Anyone know how to change the variable that controls the first part of the links in admin site (http://my.site.com). I need to change the first part http to https . Any ideas, I have changed everything in both configure files but neither one seems to have any affect on the first part of the links.

 

 

define('HTTP_SERVER', 'https://secure.therusticedge.com'); // eg, http://localhost - should not be NULL for productive servers

 define('HTTPS_SERVER', 'https://secure.therusticedge.com'); // eg, https://localhost - should not be NULL for productive servers

 define('HTTP_CATALOG_SERVER', '');

 define('HTTPS_CATALOG_SERVER', '');

 define('ENABLE_SSL', 'true'); // secure webserver for administration tool

 define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

 define('DIR_FS_DOCUMENT_ROOT', 'https//secure.therusticedge.com'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

 define('DIR_WS_ADMIN', $DOCUMENT_ROOT . '/admin/');

 define('DIR_FS_ADMIN', DIR_WS_ADMIN);

 define('DIR_WS_CATALOG', '/catalog/');

 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

 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/');



// define our database connection

 define('DB_SERVER', '');

 define('DB_SERVER_USERNAME', 'mysql');

 define('DB_SERVER_PASSWORD', '');

 define('DB_DATABASE', 'catalog');

 define('USE_PCONNECT', 'false');

 define('STORE_SESSIONS', '');

?>

Daniel

IdeaTek

Link to comment
Share on other sites

For those who want to know:

 

This was an 8 hour headache that I finnaly solved by aimlessly searching my admin folder. I came upon another configure folder in admin/includes/local . Change the http to https in there and it changed over everthing in admin to SSL.

 

so glad to get this one behind me

Daniel

IdeaTek

Link to comment
Share on other sites

To clarify more on the local folders...

 

Both the 'catalog' and 'admin' sides have 'includeslocal' folders.

This folder is designed to be on the local (testing) server ONLY, and NOT uploaded to your webserver.

osCommerce checks to see if the 'includes/local/configure.php' file is present, and if it is, then it will use that file in place of your 'includes/configure.php'.

The whole idea of the 'includes/local/configure.php' file is so you can have your local configuration in it, without having to change your 'includes/configure.php' file once you upload your site to your webserver.

 

Just remeber though, that you shouldn't transfer your 'includes/local' folder to your webserver, otherwise you will be reading your local configure.php settings and your site won't work.

 

Cheers,

Tony

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

Well my site is working with the local folder, but I will take it off. The problem I had was that it was setup automatically by my hosting company. You can add oscom to any site you want... and I guess for some reason it puts a local folder in there automatically when you create the site.

 

Thanks for your help

Daniel

Daniel

IdeaTek

Link to comment
Share on other sites

  • 3 weeks later...

for clarification on how to do this:

 

 

In your /admin/includes/configure.php file

 

look for the line:

define('HTTP_SERVER', 'http://

 

change the http:// to https://

 

that will cause all the links in the admin to be in https mode

which is important for viewing credit card data when viewing orders

Link to comment
Share on other sites

furthermore, if you want to force the admin pages to be loaded in https mode

(to prevent a person from editing the URL to reload the page in http:// mode -- you want to prevent liability saying your broken code caused a credit card number to leak out, etc. )

 

put this in the /admin/includes/configure.php file

after the line

define('ENABLE_SSL_CATALOG', 'true');

 

 

 

// if not in secure mode, redirect to secure server for this page

if($HTTP_SERVER_VARS["HTTPS"] != "on")

{

$SecureURL = '' . HTTP_SERVER . $_SERVER["REQUEST_URI"];

header("location: $SecureURL");

exit;

}

Link to comment
Share on other sites

In your /admin/includes/configure.php file

 

look for the line:

define('HTTP_SERVER', 'http://

 

change the http:// to https://

 

that will cause all the links in the admin to be in https mode

 

i tried to do this few months ago and since then catalog images (product/category/sub category images) are not shown broken in ADMIN

 

i have shared SSL

 

anyone has anyidea why is it happening and what shall i do?

 

thanks

Link to comment
Share on other sites

The problem is probably because your paths are not the same on the secure and non-secure servers. On my case the secure path is arbucklechurch/ and the unsecure path is www/arbucklechurch. The only way I found to resolve it was to put the secure server into the non-secure server variable and then everything in the admin is done securely with the same path. My configure.php is posted at http://www.oscommerce.com/forums/viewtopic.php?t=41490

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...