Fixing 404 Not Found Errors on Apache on Centos 5 x86_64 Dedi

Discussion in 'HOWTO-Related Questions' started by LinuxOnMyMac, Sep 28, 2010.

  1. LinuxOnMyMac

    LinuxOnMyMac New Member

    Hi,

    I know there's something I need to do to be able to get access to my blog directories on my Centos 5.4 x86_64 dedicated server. I have set up subdirectories like "www.thisismyblog.com/blogdirectory" and, when I put that URL into the browswer window on either my Mac or Windows boxes, I get "404 Not Found. The requested URL /blogdirectory was not found on this server".

    I've made sure the group/user permissions match the apache server (using chown) and the directories contain the wordpress software files.

    The content is in "/var/www/html" and I haven't configured the <Directory /> settings beyond the default. Further it's configured not to allow overrides, but "order allow, deny" and "Allow from all".

    My question is what Apache config file settings may affect my ability to access to my server's subdirectories?

    Is there anything else I should know or consider?

    What would help me best is solutions-oriented responses so I can get access to the content in my blog subdirectories and get my blogs live. Thank you.

    Lady Techie
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's the output of
    Code:
    ls -la /var/www/html
    ?
    Can you post the Apache vhost configuration?

    Are there more than one vhosts on the server, or do you just use the default vhost?
     
  3. LinuxOnMyMac

    LinuxOnMyMac New Member

    Thank you, falko, for trying to help me.

    The output of ls -la /var/www/html is similar to (I changed the name of the blog directories):

    drwxr-xr-x 14 root root 4096 Sep 7 18:07 .
    drwxr-xr-x 9 root root 4096 Sep 5 20:38 ..
    drwxr-xr-x 3 apache apache 4096 Sep 9 22:28 firstblog
    drwxr-xr-x 3 apache apache 4096 Sep 9 22:27 secondblog
    drwxr-xr-x 3 apache apache 4096 Sep 9 22:27 thirdflyblog
    drwxr-xr-x 11 apache apache 4096 Sep 12 02:36 fourthblog
    drwxr-xr-x 3 apache apache 4096 Sep 9 22:27 fifthblog
    drwxr-xr-x 3 apache apache 4096 Sep 9 22:27 sixthblog
    drwxr-xr-x 3 apache apache 4096 Sep 9 22:27 seventhblog
    drwxr-xr-x 2 apache apache 4096 Sep 7 18:11 mailserver
    drwxr-xr-x 3 apache apache 4096 Sep 9 22:27 eighththblog
    drwxr-xr-x 2 apache apache 4096 Sep 7 17:58 mailserver
    drwxr-xr-x 3 apache apache 4096 Sep 9 22:27 ninthblog
    drwxr-xr-x 8 apache apache 4096 Sep 7 00:39 dnserveradmin

    There are a number of vhosts on the server:

    <VirtualHost *:80>
    ServerAdmin webadmin@firstwebsite.com
    DocumentRoot "/var/www/html"
    ServerName firstwebsite.com
    ErrorLog logs/firstwebsite.com-error_log
    CustomLog logs/firstwebsite.vom-access_log common
    </VirtualHost>

    <VirtualHost *:443>
    ServerAdmin webadmin@https://server.firstwebsite.com
    DocumentRoot "/var/www/html/"
    ServerName server.firstwebsite.com
    ErrorLog logs/server.firstwebsite.com-error_log
    CustomLog logs/server.firstwebsite.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.firstblog.com
    DocumentRoot "/var/www/html/firstblog"
    ServerName www.firstblog.com
    ErrorLog logs/www.firstblog.com-error_log
    CustomLog logs/www.firstblog.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.secondblog.com
    DocumentRoot "/var/www/html/secondblog"
    ServerName www.secondblog.com
    ErrorLog logs/www.secondblog.com-error_log
    CustomLog logs/www.secondblog.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.thirdblog.me
    DocumentRoot "/var/www/html/thirdblog"
    ServerName www.thirdblog.me
    ErrorLog logs/www.thirdblog.me-error_log
    CustomLog logs/www.thirdblog.me-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.fourthblog.com
    DocumentRoot "/var/www/html/fourthblog"
    ServerName www.fourthblog.com
    ErrorLog logs/www.fourthblog.com-error_log
    CustomLog logs/www.fourthblog.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.fifthblog.com
    DocumentRoot "/var/www/html/fifthblog"
    ServerName www.fifthblog.com
    ErrorLog logs/www.fifthblog.com-error_log
    CustomLog logs/www.fifthblog.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.sixthblog.com
    DocumentRoot "/var/www/html/sixthblog"
    ServerName www.sixthblog.com
    ErrorLog logs/www.sixthblog.com-error_log
    CustomLog logs/www.sixthblog.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.seventhblog.com
    DocumentRoot "/var/www/html/seventhblog"
    ServerName www.seventhblog.com
    ErrorLog logs/www.seventhblog.com-error_log
    CustomLog logs/www.seventhblog.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.eighthblog.com
    DocumentRoot "/var/www/html/eighthblog"
    ServerName www.eighthblog.com
    ErrorLog logs/www.eighthblog.com-error_log
    CustomLog logs/www.eighthblog.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.ninthblog.com
    DocumentRoot "/var/www/html/ninthblog"
    ServerName www.ninthblog.com
    ErrorLog logs/www.ninthblog.com-error_log
    CustomLog logs/www.ninthblog.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.secondwebsite.com
    DocumentRoot "/var/www/html"
    ServerName www.secondwebsite.com
    ErrorLog logs/www.secondwebsite.com-error_log
    CustomLog logs/www.secondwebsite.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.thirdwebsite.com
    DocumentRoot "/var/www/html"
    ServerName www.thirdwebsite.com
    ErrorLog logs/www.thirdwebsite.com-error_log
    CustomLog logs/www.thirdwebsite.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.fourthwebsite.com
    DocumentRoot "/var/www/html"
    ServerName www.fourthwebsite.com
    ErrorLog logs/www.fourthwebsite.com-error_log
    CustomLog logs/www.fourthwebsite.com-access_log common
    </VirtualHost>

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.fifthwebsite.com
    DocumentRoot "/var/www/html"
    ServerName www.fifthwebsite.com
    ErrorLog logs/www.fifthwebsite.com-error_log
    CustomLog logs/www.fifthwebsite.com-access_log common
    </VirtualHost>

    Please let me know what to try next.

    BTW, I have the following directory permissions format:

    <Directory "/var/www/html/documentrootsubdirectory">
    Options +Indexes FollowSymLinks +ExecCGI
    AllowOverride AuthConfig FileInfo
    Order allow,deny
    Allow from all
    </Directory>

    Again, thanks for your help.

    Lady Techie
     
    Last edited: Oct 1, 2010
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Which vhost is giving you the 404 error?
     
  5. LinuxOnMyMac

    LinuxOnMyMac New Member

    This one:

    drwxr-xr-x 11 apache apache 4096 Sep 12 02:36 fourthblog

    OR

    <VirtualHost 83.123.456.789:80>
    ServerAdmin webadmin@www.fourthblog.com
    DocumentRoot "/var/www/html/fourthblog"
    ServerName www.fourthblog.com
    ErrorLog logs/www.fourthblog.com-error_log
    CustomLog logs/www.fourthblog.com-access_log common
    </VirtualHost>

    Thanks.

    Lady Techie
     
  6. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

  7. LinuxOnMyMac

    LinuxOnMyMac New Member

    Thanks again, Falko.

    I think I should mention I'm trying to install Wordpress on my server. After reading what you said, I realized the problem was in the aliases configuration in my httpd.conf file so I corrected them, as well as a mistyped database in my wp_conf.php file and I no longer get a 404 message.

    Now, I get a blank page when I type "http://www.fourthblog.com/fourthblog/wp_admin/install.php".

    If I remember correctly, that has something to do with php, right? I'm going to keep working on figuring this out but I await your input.

    Lady Techie
     
    Last edited: Oct 3, 2010
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Check out Apache's error log for any PHP errors.
     
  9. LinuxOnMyMac

    LinuxOnMyMac New Member

    Re: Fixing Blank Pages Served Up on Centos 5.4 Dedi

    Did that. Here's what's in the Apache logs:

    [Sun Oct 03 04:02:02 2010] [notice] Digest: generating secret for digest authentication ...
    [Sun Oct 03 04:02:02 2010] [notice] Digest: done
    [Sun Oct 03 04:02:02 2010] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
    [Sun Oct 03 04:02:02 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
    [Sun Oct 03 14:54:32 2010] [notice] caught SIGTERM, shutting down
    [Sun Oct 03 14:54:32 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Sun Oct 03 14:54:33 2010] [notice] Digest: generating secret for digest authentication ...
    [Sun Oct 03 14:54:33 2010] [notice] Digest: done
    [Sun Oct 03 14:54:33 2010] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
    [Sun Oct 03 14:54:33 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations


    No PHP error messages. Please note that I only ask questions for which I can find no answer that has worked. I'm certain others have had the problem; I just can't find the answer without asking them. That's why I posted here. Thanks for all of your help.

    Lady Techie
     
    Last edited: Oct 3, 2010
  10. LinuxOnMyMac

    LinuxOnMyMac New Member

    Re: Fixing Blank Pages Served Up on Centos 5.4 Dedi

    Here's what I found by making some changes in my config file:

    Warning: require_once(/var/www/html/fourthblog/wp-admin/includes/upgrade.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/html/fourthblog/wp-admin/install.php on line 39

    Fatal error: require_once() [function.require]: Failed opening required '/var/www/html/fourthblog/wp-admin/includes/upgrade.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/fourthblog/wp-admin/install.php on line 39

    I have NO idea what this means and I'm not even sure how to search for the answer.

    Lady Techie
     
  11. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Does includes/upgrade.php exist in /var/www/html/fourthblog/wp-admin?
     
  12. LinuxOnMyMac

    LinuxOnMyMac New Member

    Re: Fixing Blank Pages Served Up on Centos 5.4 Dedi

    Falko,

    I'm sorry it's taken me so long to respond. I've got a lot going on.

    Anyway, I reinstalled the software on the server in the right directory and was able to get the blog up and live.

    Thank you for all of your help. I've really appreciated it.

    Dahna aka Lady Techie
     

Share This Page