The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HTTP 404 Not Found

Discussion in 'General Discussion' started by kashley, Jul 6, 2007.

  1. kashley

    kashley Member

    Joined:
    Mar 31, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Can someone please help me figure this out? I have installed and configured cPanel 11 on Fedora 7 following the instructions to the letter.

    When I try to load my web page http://onlinemedia.net.nz I get page stating that I have successfully installed cPanel and that an index page of some sort needs to be put in its place. When I do this I get the same. I have even installed phpBB to see what happens http://onlinemedia.net.nz/forums/ and that is when I get the 404 error.

    Please help as I have been trying to get this sorted for a little over a week now and am at my wits end.

    Thank you in advance:confused::mad::(
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Your website is pointing to a default directory of the server which is /usr/local/apache/htdocs/, so you receive the default cPanel page. You need to check the VirtualHost entry for the domain in /usr/local/apache/conf/httpd.conf. Check the DocumentRoot and place the NameVirtualHost entry above the VirtualHost entry of the domain.

    As your site is pointing to the default directory of the server, it is searching the forums directory over there, hence the 404 error.

    Once you resolve the first issue, forums will automatically start working.
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  4. kashley

    kashley Member

    Joined:
    Mar 31, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for your help but......I am having trouble trying to figure out the direct path. I have read the forums and read the documentation from Apache but just cannot figure it out. I realize that this is probably something as simple as adding or deleting a slash or something like that.

    Can someone please help me?

    Cheers:confused:

    This is what I have:


    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot /usr/home/public_html
    #

    and

    NameVirtualHost :222.154.251.183:80

    <VirtualHost 222.154.251.183>
    ServerName online.media.net.nz
    DocumentRoot /home/public_html
    </VirtualHost>

    ErrorDocument 400 /400.shtml
    ErrorDocument 401 /401.shtml
    ErrorDocument 403 /403.shtml
    ErrorDocument 404 /404.shtml
    ErrorDocument 500 /500.shtml
    ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/
    Alias /bandwidth/ /usr/local/bandmin/htdocs/
    Alias /sys_cpanel/ /usr/local/cpanel/sys_cpanel/
    Alias /java-sys/ /usr/local/cpanel/java-sys/
    Alias /img-sys/ /usr/local/cpanel/img-sys/
    Alias /akopia/ /usr/local/cpanel/3rdparty/interchange/share/akopia/
    Alias /neo-images/ /usr/local/cpanel/base/neomail/neo-images/
    ScriptAliasMatch ^/cpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
    ScriptAlias /securewhm /usr/local/cpanel/cgi-sys/swhmredirect.cgi
    ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
    ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi
    ScriptAliasMatch ^/kpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /controlpanel /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /securecontrolpanel /usr/local/cpanel/cgi-sys/sredirect.cgi
    Alias /mailman/archives/ /usr/local/cpanel/3rdparty/mailman/archives/public/
    ScriptAlias /mailman/ /usr/local/cpanel/3rdparty/mailman/cgi-bin/
    Alias /pipermail/ /usr/local/cpanel/3rdparty/mailman/archives/public/
    Alias /interchange/ /usr/local/cpanel/3rdparty/interchange/share/interchange/
    Alias /interchange-5/ /usr/local/cpanel/3rdparty/interchange/share/interchange-5/

    <Location /whm-server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    </Location>
    ExtendedStatus On

    NameVirtualHost 222.154.251.183:80

    <VirtualHost 222.154.251.183:80>
    ServerAlias www.xfactor-design.co.nz
    ServerAdmin webmaster@xfactor-design.co.nz
    DocumentRoot /home/wwwxfac/public_html
    ServerName xfactor-design.co.nz

    User wwwxfac
    Group wwwxfac
    BytesLog /usr/local/apache/domlogs/xfactor-design.co.nz-bytes_log
    CustomLog /usr/local/apache/domlogs/xfactor-design.co.nz combined
    ScriptAlias /cgi-bin/ /home/wwwxfac/public_html/cgi-bin/
    </VirtualHost>

    NameVirtualHost 222.154.251.183:80


    NameVirtualHost 192.168.1.65:80
    <VirtualHost 222.154.251.183:80>
    ServerAlias www.onlinemedia.net.nz
    ServerAdmin webmaster@onlinemedia.net.nz
    DocumentRoot /home/wwwonli/public_html
    ServerName onlinemedia.net.nz
    User wwwonli
    Group wwwonli
    BytesLog /usr/local/apache/domlogs/onlinemedia.net.nz-bytes_log
    CustomLog /usr/local/apache/domlogs/onlinemedia.net.nz combined
    ScriptAlias /cgi-bin/ /home/wwwonli/public_html/cgi-bin/
    </VirtualHost>
     
    #4 kashley, Jul 6, 2007
    Last edited: Jul 6, 2007
  5. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    First of all remove the below entry:
    NameVirtualHost 192.168.1.65:80

    Change the DocumentRoot line from
    DocumentRoot /usr/home/public_html
    to
    DocumentRoot /usr/local/apache/htdocs


    You should use one NameVirtualHost entry for one IP. Just keep the first one. Like, change the below part from

    NameVirtualHost :222.154.251.183:80
    <VirtualHost 222.154.251.183>
    ServerName online.media.net.nz
    DocumentRoot /home/public_html
    </VirtualHost>

    to

    NameVirtualHost 222.154.251.183:80
    <VirtualHost 222.154.251.183>
    ServerName <ServerHostname> << place the server hostname excluding brackets
    DocumentRoot /usr/local/apache/htdocs
    </VirtualHost>


    Also try changing the virtualhost entry for all the domains from
    <VirtualHost 222.154.251.183:80>
    to
    <VirtualHost 222.154.251.183>

    Save the file and restart apache service.
     
  6. kashley

    kashley Member

    Joined:
    Mar 31, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thank you so much for your help. Everything is working a charm now. Always something so simple that you don't notice it.

    Thank you again :eek::D
     
  7. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Speaking of which -- did you notice the comment above saying that Fedora Core 7 is not supported? You may have fixed this problem, this time around, but if it's not supported aren't you asking for trouble down the track?
     
Loading...

Share This Page