Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Installing Zen Cart / Installing on a Linux/Unix Server / links go to http instead of https (page not found)

links go to http instead of https (page not found)

Locked

Started by maclean on 21 Oct 2006, 11:32 PM · Views: 3,956

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
21 Oct 2006, 11:32 PM
#1
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

Post #1 by maclean

Hello there!

Fresh install & all my links in the store and admin section point to http instead of https, causing a page not found error. If I manually add the "s" to the URL, the correct pages are always there. I thought my config looked right, but I guess not? Config file is below.

Appreciate your help!
S

define('HTTP_SERVER', 'http://www.mysite.com');
define('HTTPS_SERVER', 'https://www.mysite.com');
define('HTTP_CATALOG_SERVER', 'http://www.mysite.com');
define('HTTPS_CATALOG_SERVER', 'https://www.mysite.com');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'true');
define('ENABLE_SSL_ADMIN', 'true');
define('ENABLE_SSL', true); // secure webserver for checkout procedure?

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/boxoffice/admin/');
define('DIR_WS_CATALOG', '/boxoffice/');
define('DIR_WS_HTTPS_ADMIN', '/boxoffice/admin/');
define('DIR_WS_HTTPS_CATALOG', '/boxoffice/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
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', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_ADMIN', '/var/www/vhosts/mysite.com/httpsdocs/boxoffice/admin/');
define('DIR_FS_CATALOG', '/var/www/vhosts/mysite.com/httpsdocs/boxoffice/');

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_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'private');
define('DB_SERVER_PASSWORD', 'private);
define('DB_DATABASE', 'mydb');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'database');
define('DIR_FS_SQL_CACHE', '/var/www/vhosts/mysite.com/httpsdocs/boxoffice/cache');

22 Oct 2006, 12:27 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,758
Plugin Contributions:
0

Post #2 by Kim

Without seeing the real URL it is nearly impossible to diagnose.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

22 Oct 2006, 1:06 AM
#3
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

Post #3 by maclean

Sorry, didn't realize that. Here's the info again, with the URL:

*/
define('HTTP_SERVER', 'http://www.reelasian.com');
define('HTTPS_SERVER', 'https://www.reelasian.com');
define('HTTP_CATALOG_SERVER', 'http://www.reelasian.com');
define('HTTPS_CATALOG_SERVER', 'https://www.reelasian.com');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'true');
define('ENABLE_SSL_ADMIN', 'true');
define('ENABLE_SSL', true); // secure webserver for checkout procedure?

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/boxoffice/admin/');
define('DIR_WS_CATALOG', '/boxoffice/');
define('DIR_WS_HTTPS_ADMIN', '/boxoffice/admin/');
define('DIR_WS_HTTPS_CATALOG', '/boxoffice/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
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', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_ADMIN', '/var/www/vhosts/reelasian.com/httpsdocs/boxoffice/admin/');
define('DIR_FS_CATALOG', '/var/www/vhosts/reelasian.com/httpsdocs/boxoffice/');

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_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'private');
define('DB_SERVER_PASSWORD', 'private');
define('DB_DATABASE', 'private');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'database');
define('DIR_FS_SQL_CACHE', '/var/www/vhosts/reelasian.com/httpsdocs/boxoffice/cache');

22 Oct 2006, 12:51 PM
#4
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Post #4 by vger

Well, when I go to your website address I can only get it at the https address, and get a 'File Not Found' error at http://

Perhaps your hosts use one of those rubbish two-folder systems where you have an httpdocs and a separate httpsdocs folder?

Vger

22 Oct 2006, 2:04 PM
#5
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

Post #5 by maclean

Yes, my host does have a 2 folder system. Ack! What can I do?

Thanks for your help!

22 Oct 2006, 4:12 PM
#6
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Post #6 by vger

Well, you can tell your hosts to go back to the Plesk server setup screens, and tell them that this time they should tick the box that aliases the httpsdocs folder to the httpdocs folder.

Alternatively, you can keep a complete copy of all files/folders in the httpsdocs folder, and keep another copy, but minus the 'admin' folder, in the httpdocs folder.

Vger

22 Oct 2006, 9:23 PM
#7
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

Post #7 by maclean

Ah, thank you! Can I just copy the folders from https to http or do a fresh installation of everything onto http?

22 Oct 2006, 11:45 PM
#8
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Post #8 by vger

Given that the site is at the moment only available on https:// I'd suggest copying the httpsdocs folder to http docs (minus the admin folder which would then only be available via https://).

Vger

23 Oct 2006, 1:25 AM
#9
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

Post #9 by maclean

Thanks for all the help Vger!

I've copied everything but am now getting errors on every page. Variations of: "open_basedir restriction in effect" (ex. http://www.reelasian.com/boxoffice/)

When I'm in the admin area, every link tries to move me from https to http (causing errors).

Not sure what to try next.

23 Oct 2006, 10:44 AM
#10
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Post #10 by vger

Okay, when hosts use PHP in Safe Mode that can mean very little inconvenience, or it can mean that they make it impossible for you to run a dynamic php based website.

When the latter happens it is usually because they don't know what they are doing, and apply restrictions to every single folder. This looks to be the case wih your site.

It's my view that your only real choice is to move hosts.

Vger

23 Oct 2006, 11:20 AM
#11
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

Post #11 by maclean

Unfortunately moving to a new host isn't possible but I've put in a request to the host to make the settings change with regards to the https & http folder aliasing. Are there other things I could ask for that would help (stop running in safe mode)?

Cheers!

23 Oct 2006, 11:36 AM
#13
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Post #13 by vger

Unfortunately ....your hosts aren't going to stop PHP running in Safe Mode because you ask them to - unless you own the server or have a virtual dedicated server.

Vger

23 Oct 2006, 11:43 AM
#14
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Post #14 by vger

If Safe Mode is off then you can try fixing the Open Base Dir restriction by making the tmp folder path just tmp with no slash before or after it e.g. tmp not /tmp or tmp/ or /tmp/

Vger

23 Oct 2006, 2:55 PM
#15
maclean avatar

maclean

New Zenner

Join Date:
Feb 2006
Posts:
57
Plugin Contributions:
0

Post #15 by maclean

Sorry to ask what's probably an obvious question but where do I make that change to the tmp dir path?

Cheers!