PDA

View Full Version : admin login and https



MikeF
02-03-2003, 09:19 AM
Hi folks,
i have used .htaccess to protect the /catalog/admin directory. I have tried logging in under https and i can. The problem is the links on the admin interface are http and not https. Should I be able to or is there a way to stay on the secure server or https the whole time you are in the admin?
:lol:

MikeF
02-07-2003, 12:22 PM
Just a friendly and hopeful bump. :lol:

Hi folks,
i have used .htaccess to protect the /catalog/admin directory. I have tried logging in under https and i can. The problem is the links on the admin interface are http and not https. Should I be able to or is there a way to stay on the secure server or https the whole time you are in the admin?
:lol:

michael_s
02-07-2003, 12:37 PM
In the /admin/includes/configure.php change the following to say https://yoursite.com :


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

SSL enabled. :)

abarnes
02-07-2003, 02:44 PM
I am having the same problem with https except I have it in the config pointing to https.

If I type the address with https in the browser i get the ssl lock icon. however if i just type the address it doesn't go into ssl mode.

I read one of the posts that said make the regular server point to ssl and it will work, but that didn't work for me either.

MikeF
02-07-2003, 06:19 PM
Yes I have checked that a couple of times. I have set correctly in that file and the catalog/includes/configure.php


define('HTTP_SERVER', 'http://store.agileservers.net/catalog'); // eg, http://localhost - should not be NULL for productive servers
define('HTTPS_SERVER', 'https://secure10.vosn.net/~agileser/store/catalog'); // eg, https://localhost - should not be NULL for productive servers
define('ENABLE_SSL', true); // secure webserver for checkout procedure?

The links on the admin main page all still reference non-ssl links. I can login in under https just fine, but all the links on the main admin page are non ssl.
what do you think?


In the /admin/includes/configure.php change the following to say https://yoursite.com :


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

SSL enabled. :)

michael_s
02-07-2003, 11:26 PM
MikeF,

If the example you posted is the code you have in your actual config, you have NOT done what I said. Look closely, I have changed the HTTP_SERVER to point to a https link. Do it and it will work for you.

You have to change the :


define('HTTP_SERVER', 'http://store.agileservers.net/catalog');

To


define('HTTP_SERVER', 'https://secure10.vosn.net/~agileser');

Also note that you should not have the /catalog subdirectory specified in these areas. That is incorrect, only the base url.

MikeF
02-08-2003, 09:02 AM
Thank you very much for all your help!

Here are my settings so maybe this will help others as well. At this minute things seem to be working ok. ;) These settings permit me to login to the admin under https and it stays in https all through the admin. The Catalog seems to work correctly and there is https in the "Checkout" and Customers login:

For catalog/admin/includes/configure.php



define('HTTP_SERVER', 'https://secure10.vosn.net/~agileser'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
define('HTTP_CATALOG_SERVER', 'http://store.agileservers.net/catalog');
define('HTTPS_CATALOG_SERVER', 'https://secure10.vosn.net/~agileser');
define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', '/home/agileser/public_html/store'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/home/agileser/public_html/store/catalog/admin/'); // absolute path required
define('DIR_WS_CATALOG', '/'); // absolute path required changed from /catalog/ on 9:51 PM 1/24/2003 by mikef
define('DIR_FS_CATALOG', '/home/agileser/public_html/store/catalog/'); // absolute path required


For catalog/includes/configure.php



define('HTTP_SERVER', 'http://store.agileservers.net/catalog'); // eg, http://localhost - should not be NULL for productive servers
define('HTTPS_SERVER', 'https://secure10.vosn.net/~agileser/store/catalog'); // eg, https://localhost - should not be NULL for productive servers
define('ENABLE_SSL', 'true'); // secure webserver for checkout procedure?
define('DIR_WS_CATALOG', '/'); // absolute path required changed from /catalog/ on 9:51 PM 1/24/2003 by mikef

MikeF
03-11-2003, 01:15 PM
Thank you very much for all your help!

Here are my settings so maybe this will help others as well. At this minute things seem to be working ok. ;) These settings permit me to login to the admin under https and it stays in https all through the admin. The Catalog seems to work correctly and there is https in the "Checkout" and Customers login:

For catalog/admin/includes/configure.php



define('HTTP_SERVER', 'https://secure10.vosn.net/~agileser'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
define('HTTP_CATALOG_SERVER', 'http://store.agileservers.net/catalog');
define('HTTPS_CATALOG_SERVER', 'https://secure10.vosn.net/~agileser');
define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', '/home/agileser/public_html/store'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/home/agileser/public_html/store/catalog/admin/'); // absolute path required
define('DIR_WS_CATALOG', '/'); // absolute path required changed from /catalog/ on 9:51 PM 1/24/2003 by mikef
define('DIR_FS_CATALOG', '/home/agileser/public_html/store/catalog/'); // absolute path required


For catalog/includes/configure.php



define('HTTP_SERVER', 'http://store.agileservers.net/catalog'); // eg, http://localhost - should not be NULL for productive servers
define('HTTPS_SERVER', 'https://secure10.vosn.net/~agileser/store/catalog'); // eg, https://localhost - should not be NULL for productive servers
define('ENABLE_SSL', 'true'); // secure webserver for checkout procedure?
define('DIR_WS_CATALOG', '/'); // absolute path required changed from /catalog/ on 9:51 PM 1/24/2003 by mikef
Well I lied about those settings. I can login ok with https and links in the admin interface reflect https but when i clcik on them I get error 404's like:
Not Found
"The requested URL /~agileser/catalog/admin/categories.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
I checked and that file, categories.php is in that dir.

For the above error this was the link in the admin interface. https://secure10.vosn.net/~agileser/catalog/admin/categories.php?selected_box=catalog


My settings for includes/admin/configure.php are:

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'https://secure10.vosn.net/~agileser'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
define('HTTP_CATALOG_SERVER', 'http://store.agileservers.net/catalog');
define('HTTPS_CATALOG_SERVER', 'https://secure10.vosn.net/~agileser');
define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', '/home/agileser/public_html/store'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/home/agileser/public_html/store/catalog/admin/'); // absolute path required
define('DIR_WS_CATALOG', '/'); // absolute path required changed from /catalog/ on 9:51 PM 1/24/2003 by mike foate
define('DIR_FS_CATALOG', '/home/agileser/public_html/store/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/');

My settings for /includes/configure.php are:

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://store.agileservers.net/catalog'); // eg, http://localhost - should not be NULL for productive servers
define('HTTPS_SERVER', 'https://secure10.vosn.net/~agileser'); // eg, https://localhost - should not be NULL for productive servers
define('ENABLE_SSL', 'true'); // secure webserver for checkout procedure?
define('DIR_WS_CATALOG', '/'); // absolute path required changed from /catalog/ on 9:51 PM 1/24/2003 by mike foate
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_INCLUDES', 'includes/'); // If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), this can be a URL instead of a local pathname
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', DIR_WS_CATALOG . 'pub/');
define('DIR_FS_DOCUMENT_ROOT', '/home/agileser/public_html/store');
define('DIR_FS_CATALOG', '/home/agileser/public_html/store/catalog/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');