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.

How to fix the NameVirtualHost warn errors

Discussion in 'General Discussion' started by demomen, Jun 6, 2005.

  1. demomen

    demomen Well-Known Member

    Joined:
    Sep 25, 2004
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    These are the errors when PHP was compiled, I've removed the IP and replaced it with IP.IP.IP.IP


    [Tue Jun 7 00:36:25 2005] [warn] VirtualHost IP.IP.IP.IP:80 overlaps with VirtualHost IP.IP.IP.IP:80,
    the first has precedence, perhaps you need a NameVirtualHost directive
    [Tue Jun 7 00:36:25 2005] [warn] VirtualHost IP.IP.IP.IP:80 overlaps with VirtualHost IP.IP.IP.IP:80,
    the first has precedence, perhaps you need a NameVirtualHost directive
    [Tue Jun 7 00:36:25 2005] [warn] NameVirtualHost IP.IP.IP.IP:80 has no VirtualHosts
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Before the first VirtualHost container for that IP address, add the following into httpd.conf:

    NameVirtualHost 11.22.33.44

    Replacing 11.22.33.44 with the IP address in question. Then restart apache.
     
  3. demomen

    demomen Well-Known Member

    Joined:
    Sep 25, 2004
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    How do I test to see if it shows the warn error again without compiling PHP.

    The first is already there, as you can see..


    Code:
    ##
    ## SSL Virtual Host Context
    ##
    
    
    </IfDefine>
    
    
    NameVirtualHost 11.22.33.44:80
    
    
    <VirtualHost 11.22.33.44>
    BytesLog domlogs/server1.server.com-bytes_log
    ServerName server1.server.com
    DocumentRoot /usr/local/apache/htdocs
    </VirtualHost>
    
    
    <Location /whm-server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
    </Location>
    ExtendedStatus On
    
    
    
    
    <VirtualHost 11.22.33.44>
     
    #3 demomen, Jun 7, 2005
    Last edited: Jun 7, 2005
  4. acewebi

    acewebi Registered

    Joined:
    Mar 6, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, Texas
    Just restart httpd and you should see those errors, if they do come up.

    Code:
    service httpd restart
     
  5. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    In shell just use:
    /usr/sbin/httpd configtest
     
  6. acewebi

    acewebi Registered

    Joined:
    Mar 6, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, Texas
    that too :D
     
  7. Xpress-Host.net

    Xpress-Host.net Registered

    Joined:
    Feb 10, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Orlando, Florida
    I'm having the same problem with the virtual host and "/usr/sbin/httpd configtest" cannot be found.
     
  8. drupal

    drupal Active Member

    Joined:
    Jun 23, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Not here, but there.
    /usr/local/apache/bin/apachectl configtest

    THAT is the correct and proper place. If you are running a server you should already know this.
     
  9. Xpress-Host.net

    Xpress-Host.net Registered

    Joined:
    Feb 10, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Orlando, Florida
    I did that and i got
    "Warning: DocumentRoot [/home/berno/public_html/l] does not exist
    Warning: DocumentRoot [/home/shopwith/public_html/forums] does not exist
    Syntax error on line 2037 of /usr/local/apache/conf/httpd.conf:
    Invalid command 'SSLEnable', perhaps mis-spelled or defined by a module not included in the server configuration" error

    -- EDIT --

    I removed the SSL Cert and now i get the error

    "Warning: DocumentRoot [/home/berno/public_html/l] does not exist
    Warning: DocumentRoot [/home/shopwith/public_html/forums] does not exist
    Warning: DocumentRoot [/home/silent/public_html/forum] does not exist
    Warning: DocumentRoot [/home/ava/public_html/staff] does not exist
    Syntax OK"

    and my sites still dont work.
     
    #9 Xpress-Host.net, Jul 1, 2005
    Last edited: Jul 1, 2005
  10. drupal

    drupal Active Member

    Joined:
    Jun 23, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Not here, but there.
    For those docroot warnings, are those valid accounts? If not remove them from httpd.conf
     
  11. Don7t

    Don7t Member

    Joined:
    Mar 8, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1

    I'm new at this, would I put (NameVirtualHost 11.22.33.44) before every account with the trouble ip?


    Thanks
     
  12. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    The NameVirtualHost line only needs to be there once for each IP used. Just make sure each one is BEFORE the first VirtualHost entry that uses that IP.

    Every now and then I do a manual cleanup of my httpd.conf files and what I do is put all NameVirtualHost lines together just before the first VirtualHost entry.
     
  13. quicklyweb

    quicklyweb Member

    Joined:
    Apr 24, 2005
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
  14. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    That sounds like the 2 lines
    ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
    are missing from the httpd.conf file.
     
Loading...

Share This Page