the home/www/web12/web/images and the 404 error

Discussion in 'Installation/Configuration' started by jeanjacquesjeanjacques, Jan 23, 2006.

  1. Hello,

    If i create a folder called images in the root folder of my website (for example the home/www/web12/web/images) i cannot access this folder with my web browser, apache is returning me a 404 error.

    This is a bit puzzling do you have any idea (i checked and i have no .htaccess in this folder)

    If you have a solution i would appreciate.

    Best regards,

    JJ
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    please post the output of:

    ls -la /home/www/web12/web/images
     
  3. Hi Till,

    This is the output

    # ls -la /home/www/web12/web/images
    total 8
    drwxr-xr-x 2 web12_jeanjacques web12 4096 2006-01-23 17:12 .
    drwxrwxr-x 10 web12_jeanjacques web12 4096 2006-01-23 17:11 ..
    -rwxrwxr-x 1 web12_jeanjacques web12 0 2006-01-23 17:12 index2.html
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Are you sure you're trying to access the correct web site in your browser? If the folder exists and it is a permissions problem, you should get a 403 error. But you have a 404 error...
     
  5. Hello Falko,

    Yes, i am really sure that i try to access the correct website. I'm really confused by this error, i really don't understand what's going on.
    What kind of log or config file could help me to solve this problem ?

    Best regards,

    JJ
     
  6. falko

    falko Super Moderator ISPConfig Developer

    The logs in /var/log/httpd or /var/log/apache.
     
  7. Hello Falko,

    Nothing special is appearing inside the error.log inside /var/log/apache/error.log these are the last lines of this file, [Mon Jan 23 19:52:13 2006] [error] [client 68.96.26.136] File does not exist: /var/www/sharedip/xmlrpc/xmlrpc.php
    [Mon Jan 23 19:52:14 2006] [error] [client 68.96.26.136] File does not exist: /var/www/sharedip/xmlsrv/xmlrpc.php
    [Mon Jan 23 21:59:53 2006] [error] [client 66.70.255.159] File does not exist: /var/www/sharedip/htmltonuke.php

    There is nothing about this 404 error.....

    What could i do ? do you have an idea ?

    Thanks,

    JJ
     
  8. hairydog2

    hairydog2 New Member

    Are you typing the domain name into the browser, or just the IP address?
     
  9. falko

    falko Super Moderator ISPConfig Developer

    hairydog2 is right. If /home/www/web12/web's FQDN is www.example.com, you must access the web site by using www.example.com, not the IP address or just example.com (unless example.com is listed under Co-Domains).
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check with dig, if the site resolves to the correct IP:

    dig www.mysite.net

    Then check the hosts file of your workstation, that it does not include an entry for www.mysite.net that points to the wrong IP.

    Then have a look at the file: Vhosts_ispconfig.conf and post the vhost part for www.mysite.net here.
     
  11. dig www.mysite.net

    ; <<>> DiG 9.2.4 <<>> www.mysite.net
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33971
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;www.mysite.net. IN A

    ;; ANSWER SECTION:
    www.mysite.net. 85965 IN A 193.251.177.175

    ;; Query time: 31 msec
    ;; SERVER: 193.252.19.4#53(193.252.19.4)
    ;; WHEN: Tue Jan 24 10:37:38 2006
    ;; MSG SIZE rcvd: 49

    it's resolving to the correct ip (193.251.177.175)

    cat /etc/hosts

    127.0.0.1 localhost localhost
    192.168.5.10 hulk.strategic-monitoring.com hulk
    193.251.177.175 www.strategic-monitoring.com hulk
    192.168.5.10 hulk.eatn.net hulk
    193.251.177.175 www.eatn.net hulk

    Apparently i don't have any dns entries related to mywebsite.net, do i need one ?

    here it is:

    ######################################
    # Vhost: www.mysite.net
    ######################################
    #
    #
    <VirtualHost 192.168.5.10>
    ServerName www.mysite.net
    ServerAdmin [email protected]
    DocumentRoot /home/www/web12/web
    ServerAlias mysite.net www.mysite.net jabber.mysite.net
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    ScriptAlias /cgi-bin/ /home/www/web12/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /home/www/web12/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /home/www/web12/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web12/user/$1/web/$3
    </VirtualHost>

    Thank you for helping because i'm really lost.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    This looks OK so far.

    If you open http://www.mysite.net in a browser, did you get the index page in /home/www/web12/web ?
     
  13. Hello,

    Yes, the index.html is displayed if i try http://www.mysite.net.

    I've made a test, and if i create a subfolder inside my /home/www/web12/www called test2 and put the folder images inside (therefore i'll have /home/www/web12/www/test2/images) i can display the file /home/www/web12/www/test/images/test2.txt for example.

    Do you have other ideas ?

    Best regards,


    JJ
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    If this works, there must be either an .htaccess file or something in your apache config outside of the vhost configuration thatrewrites access to the images directory. Have you looked at the shell with the "ls -la /path/to/directory" commad in /home/www/web12/web and /home/www/web12/web/images if there are really no .htaccess files?

    By the way, i guess you mean /home/www/web12/web/test2/images and not /home/www/web12/www/test2/images ?
     
  15. Hello,

    I've checked on more time, the ls -al command didn't give any answer.
    Now i'm trying to see if there's something wrong with the apache config but i'm not sure to edit the proper file.
    Could you tell me where is the httpd.conf file used by my websites running with isp config ?

    Best regards,
     
  16. falko

    falko Super Moderator ISPConfig Developer

    Code:
    httpd -V
    gives you the answer about the configuration file.
     

Share This Page