[warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts

Discussion in 'Installation/Configuration' started by wa4bro, Jun 27, 2010.

  1. wa4bro

    wa4bro New Member

    I have been racking my brain all day on this one. Time for some help please....

    Centos 5.5

    Something changed today on my server. I did get some yum updates but I do not think that caused the issue. I am running latest ispconfig2, updated a few weeks ago. From my very 1st. install I noticed during post that when starting httpd I would get this warning [warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts. This did not keep httpd from starting and running and has been working fine for almost 2 years.

    I was in the admin panel today and added a user to a domain and saved it. Sometime later I noticed httpd was down. I tried to restart from the admin panel but it would always fail. I ssh into the server and tried restarting from the command line and http would fail, With [warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts In the past this has never stopped httpd from starting or the server working as normal.

    I have looked at all I know (which is not as much as I need to know) and I can not see the issue. I replaced the httpd.conf and Vhosts_ispconfig.conf from last nights backup httpd started. Shortly after I restarted the server and httpd failed to start again. I replaced both the files and this time it made no difference. Everything else seems to be working but httpd

    Anyone have any ideas of how to get httpd to restart again? I have about 20 domains on the server and I sure don't want to start from scratch again:(

    Thanks in advance....
    Dan
     
  2. wa4bro

    wa4bro New Member

    Solved - Replying to my own post

    After about 10 hours with this I finally have everything back to running again.

    Since I see more than 30 people read this without reply, I have an idea that maybe someone else has seen this issue too so here is what I found.

    1. Deciding to do server maintenance, more than one thing at a time can cause yourself issues:cool: like doing a yum update and working on an ssl certificate too.

    2. The initial problem of NamedVirtualHost has been my own fault from the beginning. There is no need to add your server IP address in the list of available IP addresses, this causes two entries in your /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf file. Removing the duplicate solved the NamedVirtualHost warning.

    3. I also noticed that named was not running and then realized with some reading here that the permissions on bind had changed with the yum update and was causing that problem. Following one of Falko's post I reset the permissions and dns came back up.

    4. httpd would still not restart but now it was just "failed" and not mentioning the NamedVirtualHost warning or error. A check of the error log yielded NOTHING. A config check of httpd.conf passed as ok and this was driving me crazy. What I learned off list is that the ssl module in Apache is worthless for giving any errors in the log files. So my next step was to look at my ssl section of all my virtual hosts in /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf There I noticed my directive for my bundled godaddy certificate I installed had the wrong web id on it.

    So what I really learned is LOG files help, but when it comes to http not starting and nothing is gleaned from the error log..... LOOK at all your ssl statements in your virtual hosts config file because it appears very little to nothing will be logged from ssl statement failures and httpd will fail to start without showing any errors!

    I hope this helps out other new guys to Linux like me!
     

Share This Page