Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SSL certificate blocking login?


Nilbolgin

Recommended Posts

Posted

Hello

I just installed a SSL cerificate on my site and oscommerce store.

I am not able to log into the administrative area since I did this. I get an invalid log-in details error.

 

The site is

www.portagebeverage.com

(https://portagebeverage.com)

 

After I successfully set up the SSL cert. I added this code to my htaccess file.

 

RewriteEngine On

RewriteCond %{SERVER_PORT} ^80$

RewriteRule ^(.*)$ https://www.portagebeverage.com/$1 [L,R]

 

If I remove this code and visit the site without the https link I can log in fine.

Is there a way to direct shoppers to the https and still use the http to log into the admin center?

 

Has anyone had experience with this problem and possibly advise me on the best way to fix it?

Posted

try the following code for .htaccess file:

 

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTPS} off

RewriteRule (.*) https://www.portagebeverage.com%{REQUEST_URI}

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted
try the following code for .htaccess file:

 

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTPS} off

RewriteRule (.*) https://www.portagebeverage.com%{REQUEST_URI}

 

 

OK, that did not work...but do I need to skip the htaccess file (delete the redirect code) and setup the ssl in the configuration files. Once that is done all will be good right?

Posted

/includes here

 

<?php
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.portagebeverage.com');
 define('HTTPS_SERVER', 'http://www.portagebeverage.com');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', 'www.portagebeverage.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.portagebeverage.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', '/home/www/portagebeverage.com/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 define('DB_SERVER', 'supremecenter35.com');
 define('DB_SERVER_USERNAME', 'massnaz_pbdb');
 define('DB_SERVER_PASSWORD', 'rjpbdb321');
 define('DB_DATABASE', 'massnaz_pbdb');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

admin/includes here

 

<?php
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.portagebeverage.com');
 define('HTTP_CATALOG_SERVER', 'http://www.portagebeverage.com');
 define('HTTPS_CATALOG_SERVER', 'http://www.portagebeverage.com');
 define('ENABLE_SSL_CATALOG', 'true');
 define('DIR_FS_DOCUMENT_ROOT', '/home/www/portagebeverage.com/catalog/');
 define('DIR_WS_ADMIN', '/catalog/admin/');
 define('DIR_FS_ADMIN', '/home/www/portagebeverage.com/catalog/admin/');
 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', '/home/www/portagebeverage.com/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('DB_SERVER', 'supremecenter35.com');
 define('DB_SERVER_USERNAME', 'massnaz_pbdb');
 define('DB_SERVER_PASSWORD', 'rjpbdb321');
 define('DB_DATABASE', 'massnaz_pbdb');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

www.portagebeverage.com

The ssl certificate is not working yet I have configured these files as the guide says. My cert does use the www prefix but I see no lock or anything.

The permissions for these files is 755 right? Any suggestions?

Posted
/includes here

 

<?php
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.portagebeverage.com');
 define('HTTPS_SERVER', 'http://www.portagebeverage.com');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', 'www.portagebeverage.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.portagebeverage.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', '/home/www/portagebeverage.com/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 define('DB_SERVER', 'supremecenter35.com');
 define('DB_SERVER_USERNAME', 'massnaz_pbdb');
 define('DB_SERVER_PASSWORD', 'rjpbdb321');
 define('DB_DATABASE', 'massnaz_pbdb');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

admin/includes here

 

<?php
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.portagebeverage.com');
 define('HTTP_CATALOG_SERVER', 'http://www.portagebeverage.com');
 define('HTTPS_CATALOG_SERVER', 'http://www.portagebeverage.com');
 define('ENABLE_SSL_CATALOG', 'true');
 define('DIR_FS_DOCUMENT_ROOT', '/home/www/portagebeverage.com/catalog/');
 define('DIR_WS_ADMIN', '/catalog/admin/');
 define('DIR_FS_ADMIN', '/home/www/portagebeverage.com/catalog/admin/');
 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', '/home/www/portagebeverage.com/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('DB_SERVER', 'supremecenter35.com');
 define('DB_SERVER_USERNAME', 'massnaz_pbdb');
 define('DB_SERVER_PASSWORD', 'rjpbdb321');
 define('DB_DATABASE', 'massnaz_pbdb');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

www.portagebeverage.com

I am using this code in an htaccess file in the root

 

RewriteEngine On

RewriteCond %{SERVER_PORT} ^80$

RewriteRule ^(.*)$ https://www.portagebeverage.com/$1 [L,R]

 

The ssl certificate works fine. But I can not log into the Admin center.

If I delete the bove code form the htacess it allows me to log in.

Any suggestions?

Posted

a) catalog/includes/configure.php

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.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', 'www.yourdomain.com');

define('HTTPS_COOKIE_DOMAIN', 'yourdomain.com');

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

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

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

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

 

b ) admin/includes/configure.php

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

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

define('HTTP_CATALOG_SERVER', 'http://www.yourdomain.com');

define('HTTPS_CATALOG_SERVER', 'https://yourdomain.com');

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

 

One has true one has 'true' which is correct or are they supposed to be different...or do they both need ' XXX '?

Posted

I think I got it working now.

OSC is accessing the certificates but there is no lock showing at the bottom. Is that a big deal....

It is telling me there are unsecure items on some of the pages....another sign it is working.

if you right click properties/certificates it shows you the certificate!

 

www.portagebeverage.com

 

If anyone wants to double check it.

Posted

If any of the images..css or .js or any source is from a non ssl then this message will get displayed.

 

Just use std oscommerce coding and a proper configure.php file that should take care.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted

Can't help with the problem, but you might want to go back and edit your sql database details... your password etc are on display for the world to see.

Archived

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

×
×
  • Create New...