404 error when file exists

Discussion in 'Installation/Configuration' started by tristanlee85, Jul 3, 2006.

  1. tristanlee85

    tristanlee85 New Member

    I am coming across a very strange error that I cannot figure out. Here is a link to the file gallery:


    Now, when you browse that gallery, the existing files are shown. If I click on the file to download it, I get a 404 error when the file truely exists on the system. I checked permissions and set them to 777 and I still get the error. The only time I am able to get the file to appear is if I force download the file by setting those parameters in the AutoIndex config file. The thing is, AutoIndex isn't the reason I can't download these file. It has to be something with the server. I have no idea where to start on as to why the file exists on the system and is shown to exist in the gallery script, but when you go to download it there is a 404 error.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ls -la /home/www/www.plastikhosting.net/users/tristanlee85/web/P5210004.JPG


    ls -la /var/www/www.plastikhosting.net/users/tristanlee85/web/P5210004.JPG

    if your website root is /var/www.
  3. tristanlee85

    tristanlee85 New Member

    [[email protected] [url]www.plastikhosting.net]#[/url] ls -la web/users/tristanlee85/P5210004.JPG
    -rw-rw-rw- 1 apache apache 960883 Jul  3 02:37 web/users/tristanlee85/P5210004.JPG
  4. tristanlee85

    tristanlee85 New Member

    This is completely stupid. Here are some scenerior. To start off, this file DOES exist: /users/tristanlee85/P5210004.JPG

    When I visit:

    /users/tristanlee85/P5210004.JPG - 404 error
    /users/tristanlee85/ - 404 error
    /users/ - 403 error

    If the autoindex program can read the directory, it obviously exists. I even manually changed everything within /users/ to 0777 and I still get this error.
  5. tristanlee85

    tristanlee85 New Member

    I finally figured it out. It was the stupidest thing ever (at least I think). Appearantly there is a virtual host called "users". Well, since I had a folder called "users" in my /home/www/web17/web/ directory, when I called for the "users" folder in the /web/ folder, it must have been looking elsewhere, possibly /home/www/web17/users or something. Regardless, I re-named it to "uploads" and it all works perfectly.

    Sometimes the littlest things are a pain.

Share This Page