Okay so I'm doing searches for this as it MUST be in this forum SOMEwhere and I am just not finding it yet!
(It seems to me that maybe this is also a small bug, and it should have a different tutorial link in the installs for the newer versions)
I'm trying to secure a brand new install of the latest release (1.5.0)
I wish to rename the admin dir ... as i normally do.
The instructions that you find on THIS page: zc_install/index.php?main_page=finished
...say the following:
NEXT STEPS
For security, YOU NEED TO RENAME your /admin/ folder to a name less likely to be 'guessed' by someone probing your site for illegitimate access. There's an FAQ article on Renaming Your Admin Folder which will guide you through the simple steps.
Also for security, you will need to reset permissions on your configure.php files located in the /admin/includes/ and /includes/ folders back to read-only mode before allowing people to access your store.
when you click on the link for the instructions: https://www.zen-cart.com/tutorials/index.php?article=33 it says there:
Change ONLY THE WORD admin, in 3 places, AS SHOWN HERE:
Change this section:
define('DIR_WS_ADMIN', '/admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '/admin/');
define('DIR_WS_HTTPS_CATALOG', '/');
And this section:
define('DIR_FS_ADMIN', '/home/mystore.com/www/public/admin/');
define('DIR_FS_CATALOG', '/home/mystore.com/www/public/');
You will end up with something that looks like this:
define('DIR_WS_ADMIN', '/mysecretadminarea/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '/mysecretadminarea/');
define('DIR_WS_HTTPS_CATALOG', '/');
And:
define('DIR_FS_ADMIN', '/home/mystore.com/www/public/mysecretadminarea/');
define('DIR_FS_CATALOG', '/home/mystore.com/www/public/');
However the configure.php file on MY server after install says:
define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
define('DIR_WS_CATALOG', '/****/');
define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
define('DIR_WS_HTTPS_CATALOG', '/****/');
And
define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
define('DIR_FS_CATALOG', '/home/****/public_html/****/');
And
define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
define('DIR_FS_CATALOG', '/home/alyssak/public_html/****/');
Soooooooooo should I replace ...
preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '
and
preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '
and
realpath(dirname(__FILE__) . '/../') . '
... with '/NewSecretAdminDirName
Just seems like those are instructions for an older configure.php file that was a bit simpler ... and not for what is actually included in the new installations, so it left me a little unsure of how to best proceed without breaking the store right out the gate. lol
I'll keep searching to see if I can find the answer myself, I'm SURE this HAS to have been addressed at leas a few times already by now!
Oh and I wasn't really quite sure where the best place to post this question would be (as this isn't an upgrade install, but a fresh install of 1.5.0) if it needs to be moved I understand and sorry if I guessed incorrectly!
Bookmarks