Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Problem after moving to a new server

Problem after moving to a new server

Views: 1,751

Results 1 to 5 of 5
20 Feb 2012, 8:02 AM
#1
stecrox avatar

stecrox

New Zenner

Join Date:
Jan 2008
Location:
Perth. Australia
Posts:
64
Plugin Contributions:
0

Problem after moving to a new server

Hi guys
I am doing a major project for the company I work for.
This means moving multiple websites to a single VPS server.
The first website moved without an issue but for the second when I type in www.heightech.com.au I get the message Not Found

"The requested URL /home/safework/public_html/index.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."
However I can get to the website by typing in https://www.heightech.com.au/index.php
The company that are hosting the VPS have advised this is due to the Configure.php file.
I am not worried about the index.php part but I want all users to access this when they simply type in https://www.heightech.com.au.

I hope this makes sense.
Thanks
Stephen

20 Feb 2012, 8:10 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Problem after moving to a new server

If your hosting company is blaming a configure.php file when the real culprit is the fact that the server's apache and/or vhost is improperly configured, then you might want to reconsider whether that hosting company is competent enough to manage your site.

Your domain's vhost needs to have index.php added to the DirectoryIndex directive.
If your host isn't competent enough to do that for you for all your domains, then you'll need to do it by hand yourself by adding a public_html/.htaccess file and add the directive there yourself.
But I strongly suggest that you should NOT need to do it yourself, and that this is a sign of further problems to be anticipated down the road.

20 Feb 2012, 11:15 AM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Problem after moving to a new server

If a host can't do something as simple as this (it's such a fundamental setting) then as Dr Byte says, you are looking into a future full of heartache and problems.

Cancel your account with them and demand a refund - based on obvious ineptitude and incompetence - and find a decent host, who will know what settings to apply to your server, based on what you want to host on it.

21 Feb 2012, 8:19 AM
#4
stecrox avatar

stecrox

New Zenner

Join Date:
Jan 2008
Location:
Perth. Australia
Posts:
64
Plugin Contributions:
0

Re: Problem after moving to a new server

I have spoken to the host company and it always has had this in the vhost.
I also tried changing the .htaccess file and I am still getting the same result.
I think the problem is this.
It is looking for:
/home/safework/public_html/index.php
when the path should be /home.safework/public_html/heightech.com.au/index.php
Safework is the VPS server and root holds another zencart website site.
heightech.com.au is a subdirectory which the DNS servers are pointing to.
Still puzzled, could this be because I created zencart in teh sub domain as the IP address/heightech.com.au and when it was ready changed the DNS settings to point to it.
My configure.php file is as follows:

<?php /** * @package Configuration Settings circa 1.3.9 * @copyright Copyright 2003-2010 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * File Built by zc_install on 2012-02-15 10:15:30 */ /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ // Define the webserver and path parameters // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com define('HTTP_SERVER', 'http://118.88.19.175'); define('HTTPS_SERVER', 'https://118.88.19.175'); // Use secure webserver for checkout procedure? define('ENABLE_SSL', 'false'); // 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_CATALOG', '/heightech.com.au/'); define('DIR_WS_HTTPS_CATALOG', '/heightech.com.au/'); define('DIR_WS_IMAGES', '../images/'); define('DIR_WS_INCLUDES', 'includes/'); 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_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/'); define('DIR_WS_PHPBB', '/'); // * 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_CATALOG', '/home/safework/public_html/heightech.com.au/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/'); define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
21 Feb 2012, 5:47 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Problem after moving to a new server

Let me clarify something I missed when I posted previously.

Your error message says:

stecrox:

"The requested URL /home/safework/public_html/index.php was not found on this server.

Note that the URL is mentioning the full path, when that's absolutely incorrect.

And, since your Zen Cart configure.php settings for HTTP_SERVER and DIR_WS_CATALOG correctly don't include that path (and those are what's used to generate URLs to your Zen Cart pages), that confirms for me that your vhost is pointing to the wrong place.

You need to find out from your server administrator what's pointing your browser to /home/safework/public_html/index.php instead of just /index.php