Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2007
    Posts
    56
    Plugin Contributions
    0

    Default Installing below web root

    I have tried installing zencart and specifying some folders to be below the webroot, such as the downloads folder.

    I have edited the configure.php files both in includes and admin/includes to reflect the changes.

    But when i test it out, i get the following error message in the browser


    Warning: The downloadable products directory does not exist: /var/www/vhosts/domain.com/httpdocs//var/www/vhosts/domain.com/download/. Downloadable products will not work until this directory is valid.

    But the directory is valid and exists under
    '/var/www/vhosts/[FONT=Courier New]domain.com[/FONT]/download/'


    I have also set the configuration files to reflect this correctly

    [FONT=Arial]includes/configure.php - under filesystems[/FONT]
    [FONT=Arial]
    [/FONT][FONT=Courier New]define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/var/www/vhosts/[/FONT][FONT=Courier New]domain.com[/FONT][FONT=Courier New]/download/');
    define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

    [/FONT][FONT=Courier New]admin/includes/configure.php - under filesystems

    [/FONT][FONT=Courier New]define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/var/www/vhosts/[/FONT][FONT=Courier New]domain.com[/FONT][FONT=Courier New]/download/');[/FONT]
    [FONT=Courier New][/FONT]
    [FONT=Courier New][/FONT]
    [FONT=Courier New]Those are all instances of download and its related "pub" folder. Why therefore does it fail to work properly and still show errors yet apache has also been restarted so as to reconfigure?[/FONT]
    [FONT=Courier New][/FONT]
    [FONT=Courier New]In the vhost.conf file under conf, the following directives have been given so that Zencart can correctly reference the folders below the web root[/FONT]
    [FONT=Courier New][/FONT]
    [FONT=Courier New][/FONT]

    [FONT=Courier New][/FONT]
    [FONT=Courier New]<Directory "/var/www/vhosts/[FONT=Courier New]domain.com[/FONT]/httpdocs">
    php_admin_value open_basedir "/var/www/vhosts/
    [FONT=Courier New]domain.com[/FONT]/cache:/var/www/vhosts/[FONT=Courier New]domain.com[/FONT]/httpdocs:/tmp"
    php_admin_value open_basedir none
    php_admin_value safe_mode 0
    </Directory>
    <Directory "/var/www/vhosts/
    [FONT=Courier New]domain.com[/FONT]/httpdocs">
    php_admin_value open_basedir "/var/www/vhosts/
    [FONT=Courier New]domain.com[/FONT]/media:/var/www/vhosts/[FONT=Courier New]domain.com[/FONT]/httpdocs:/tmp"
    php_admin_value open_basedir none
    php_admin_value safe_mode 0
    </Directory>
    <Directory "/var/www/vhosts/
    [FONT=Courier New]domain.com[/FONT]/httpdocs">
    php_admin_value open_basedir "/var/www/vhosts/
    [FONT=Courier New]domain.com[/FONT]/images:/var/www/vhosts/[FONT=Courier New]domain.com[/FONT]/httpdocs:/tmp"
    php_admin_value open_basedir none
    php_admin_value safe_mode 0
    </Directory>
    <Directory "/var/www/vhosts/
    [FONT=Courier New]domain.com[/FONT]/httpdocs">
    php_admin_value open_basedir "/var/www/vhosts/
    [FONT=Courier New]domain.com[/FONT]/download:/var/www/vhosts/[FONT=Courier New]domain.com[/FONT]/httpdocs:/tmp"
    php_admin_value open_basedir none
    php_admin_value safe_mode 0
    </Directory>
    [/FONT]
    [FONT=Courier New][/FONT]
    [FONT=Courier New][/FONT]
    [FONT=Courier New][/FONT]
    [FONT=Courier New]
    [/FONT]

  2. #2
    Join Date
    Apr 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: Installing below web root

    I have almost the same problem, I have moved the download directory above the webroot, and change the configuration files but it cannot download the files. I am wondering what I need to put in the URL for the product download in this case, and if I need to do something else like add a symbolic link to the download directory (however I think that may defeat the purpose of moving the directory).

    In your case, I think you need to remove the "DIR_FS_CATALOG ." from in front of the download directory names (well that is what I did), as it is adding the extra directories in front of the download directory name.


  3. #3
    Join Date
    Apr 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: Installing below web root

    I have found my problem. My wife has set up the downloads in subdirectories off the download directory, so the files cannot be found.

  4. #4
    Join Date
    Mar 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: Installing below web root

    Thanks, that was helpful.

    I still have a problem that the pictures don't appear/show up as they are now below the web root in the "images" folder. How do i get the pictures in the images folder to show up?

  5. #5
    Join Date
    Apr 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: Installing below web root

    Quote Originally Posted by maraud View Post
    Thanks, that was helpful.

    I still have a problem that the pictures don't appear/show up as they are now below the web root in the "images" folder. How do i get the pictures in the images folder to show up?
    I don't know for sure as I haven't tried that, but I think you may have trouble doing that, as the web server needs to serve up the images to your browser, and if they are not in the web root directory it cannot see them. The downloads are handled by a script which is why they can live at the same level as the web root.

    I am more concerned about the actual products being taken, than the images of them. The images can be protected by a .htaccess file, whereas I would prefer something a bit more secure for the actual products.

  6. #6
    Join Date
    Mar 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: Installing below web root

    Thanks, that was helpful. I will only leave it for downloads above the web root.

    Can the redirect folder "pub" be renamed, or does it have to be that exact name?

  7. #7
    Join Date
    Apr 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: Installing below web root

    Quote Originally Posted by maraud View Post
    Can the redirect folder "pub" be renamed, or does it have to be that exact name?
    I think you can rename it and change the name in the configure scripts, but I havent tried this.

    If you look at the pub folder after you have sold something, you will see that the folders that are created start with a '.' (hidden files under unix) and have random characters for the directory names. Also the download script does not show the URL for the downloads, so for someone to try and guess them would be almost impossible. If you browse to the pub folder the default index.html is just a blank page.

  8. #8
    Join Date
    Jun 2004
    Posts
    52
    Plugin Contributions
    0

    Default Re: Installing below web root

    Quote Originally Posted by maraud View Post
    Thanks, that was helpful.

    I still have a problem that the pictures don't appear/show up as they are now below the web root in the "images" folder. How do i get the pictures in the images folder to show up?
    What was the purpose of putting any part of zen below the web root?

  9. #9
    Join Date
    Apr 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: Installing below web root

    Quote Originally Posted by mtnguy View Post
    What was the purpose of putting any part of zen below the web root?
    He actually means above the web root. If you put the download directory above the web root directory, the HTTP server cannot see the files, so anyone snooping around with a browser cannot find any download files.

  10. #10
    Join Date
    Mar 2007
    Posts
    56
    Plugin Contributions
    0

    Default Re: Installing below web root

    Thanks for the tips.

 

 

Similar Threads

  1. Copy index.php to Web Root
    By drziegler in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Oct 2009, 07:27 PM
  2. Root Folder on web server
    By storeman in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 23 Apr 2009, 08:48 AM
  3. Installing Zen in root domain
    By Snarg in forum Installing on a Windows Server
    Replies: 2
    Last Post: 11 Feb 2008, 08:05 PM
  4. Installing in root on temp host
    By tpatwood in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 5 Aug 2006, 01:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg