Portal Home > Knowledgebase > Articles Database > Apache Restart error


Apache Restart error




Posted by trigger007, 01-13-2013, 05:09 AM
Hello i am having a problem in my dedicated server when i try to restart apache in my server its showing an error that is "[warn] NameVirtualHost *:80 has no VirtualHosts"" How do I fix this problem? .Is there any problem with my apache installation do i need to reinstall apache.I am having a centos cpanel dedicated server please help me to solve this issue Last edited by trigger007; 01-13-2013 at 05:18 AM.

Posted by tnhadmin, 01-13-2013, 05:18 AM
The error indicates that there is namevirtualhost exists in your apache configuration file which does not have virtualhost. Check httpd.conf file if you find something like, NameVirtualHost *:80.

Posted by dareORdie, 01-13-2013, 05:27 AM
Edit your httpd.conf file and add the entry NameVirtualHost Entry in it. But before that take the backup of httpd.conf file

Posted by trigger007, 01-13-2013, 05:28 AM
ok in my httpd.conf i found virtual host section and there is a list of virtuals hosts listed there of the sites hosted in my server what should i do now? there found a line like this ""# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES. NameVirtualHost *ip* NameVirtualHost *ip* now what i can do to fix this issue? Last edited by trigger007; 01-13-2013 at 05:40 AM.

Posted by BestServerSupport, 01-13-2013, 08:03 AM
Please note that each website of your server will be having its own tag. But, above these tages there should be one like like : NameVirtualHost *:80 It it is not there then first take the backup of httpd.config file, add the line and restart Apache.

Posted by trigger007, 01-13-2013, 08:17 AM
It is there but still the probklem presist what should i do then?

Posted by BestServerSupport, 01-13-2013, 08:46 AM
Please make sure that there should be only one NameVirtualHost entry defined. So if you have more than one websites hosted on a single IP address, you will have one NameVirtualHost declaration and many VirtualHost sections to configure those domains.

Posted by trigger007, 01-14-2013, 06:55 AM
ok am using 2 ip's to run 8 sites so what will i have to do now? only make one NameVirtualHost *ip* entry and make all others as ??

Posted by BestServerSupport, 01-14-2013, 10:07 AM
If you are using Ubuntu then the warning message may be because it had NameVirtualHost *:80 both in ports.conf and in conf.d/virtualhosts,

Posted by PaulVPS-Danny, 01-14-2013, 10:19 AM
There is nothing serious with the error, just means that you have multi IPs on your server.

Posted by trigger007, 01-14-2013, 12:17 PM
but i am unable to restart apache via ssh coz of this issue

Posted by NetworkPanda, 01-14-2013, 01:20 PM
This specific message is just a warning and should not prevent Apache from starting/restarting. If Apache is not restarting, then there is another problem somewhere else which you should check, it has nothing to do with this warning.

Posted by trigger007, 01-14-2013, 01:37 PM
i have a centos 6 os running

Posted by trigger007, 01-14-2013, 01:55 PM
Ok i tried to restart apache from whm its working perfectly but when is try using ssh this error pops up is that normal?

Posted by NetworkPanda, 01-14-2013, 02:42 PM
This is not an error, this is only a warning. Apache is actually restarted and via SSH too. SSH and WHM use the same method to restart Apache, so if it works from WHM, then it works from SSH too.

Posted by trigger007, 01-15-2013, 01:41 AM
Ok thanks you for the help i will try some steps to avoid that warning!



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
LiteServer.NL Down? (Views: 794)
ZetServers - Contact (Views: 678)

Language: