Web Hosting Talk







View Full Version : Apache Errors


sbrad
10-09-2001, 03:25 AM
I'm wondering why I get these errors when I restart apache:
[Tue Oct 9 00:18:39 2001] [warn] NameVirtualHost xxx.xxx.xxx.xxx:80 has no VirtualHosts
Tons of them. I suppose maybe it's one for every site. Or one for every ip? I dunno.
I'm running Red Hat 7.1 with WHM/Cpanel.

Tim Greer
10-09-2001, 05:08 AM
Cpanel doesn't check well enough, to see if there's any further Apache directives when it removes a virtual host entry. That's to say, when you add a domain or sub domain with WHM, it adds that directive, because if there's other domains or sub domains using the same IP, it'll allow the other addresses to work. If it doesn't have that, only one will override the rest. Now, the problem comes in, when you delete a domain or sub domain in WHM, it removes the virtual host (I guess), but it doesn't remove the NameVirtualHost directive for that domain's IP. It might not remove it, in case there's still other domains or subdomains that run on that same IP, but I notice it has tons of repeated directives like that and other alias stuff, and often you'll get errors saying there's NOT any NameVirtualHost directive when you DO need one.

It's a bit screwy and not very intelligent, but those are just warning's and in most cases, it won't mess anything up and just give you annoying errors like you posted about. All in all, it's just saying that there's an IP specified in this NameVirtualHost directive and there's no domain or sub domain using that IP in a virtual host anywhere. Just remove that and any other stuff that is not supposed to be there, buy hand and save it. It'll be cleaner and get you more used to not using WHM and give you a better knowledge to be able to fix things manually that WHM might screw up or not be able to fix or handle otherwise. Good luck!

sbrad
10-09-2001, 01:20 PM
Hey Tim
That makes perfect sense. Thanks.

Palm
10-09-2001, 04:50 PM
Th way they add NameVirtualHost to a subdomain constantly makes the subdomain inactive.