How to fix the NameVirtualHost warn errors

demomen

Well-Known Member
Sep 25, 2004
111
0
166
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
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,466
31
473
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.
 

demomen

Well-Known Member
Sep 25, 2004
111
0
166
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>
 
Last edited:

Xpress-Host.net

Registered
Feb 10, 2005
3
0
151
Orlando, Florida
drupal said:
/usr/local/apache/bin/apachectl configtest

THAT is the correct and proper place. If you are running a server you should already know this.
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.
 
Last edited:

Don7t

Member
Mar 8, 2004
24
0
151
chirpy said:
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.

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


Thanks
 

PWSowner

Well-Known Member
Nov 10, 2001
2,948
4
343
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.
 

PWSowner

Well-Known Member
Nov 10, 2001
2,948
4
343
ON, Canada
quicklyweb said:
After setting namevirtual host i can't get to cpanel by typing http://www.domain.com/cpanel
or http://www.domain.com/whm. Only way i can go in is typing :2083 or 2087 to reach cpanel or whm. What is causing this?
:eek:
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.