# apache2ctl restart
[Sun Nov 16 13:36:23 2008] [warn] NameVirtualHost *:80 has no VirtualHosts
Updated Nov 16, 2008: My first solution (below) didn't work, correct solution now immediately follows...
Looks like the problem was I had to NameVirtualHost statements, one in /etc/apache2/ports.conf and one in /etc/apache2/sites-enabled/000-default.
To fix the problem, I simply commented on the declaration in /etc/apache2/ports.conf:
grep NameVirtualHost /etc/apache2/ports.conf
#NameVirtualHost *:80
Old solution I posted, that turned out, did not work.
To fix this, I added a ServerName directive, as follows:
<virtualhost *:80> ServerName hostname ServerAdmin webmaster@localhost
16 comments:
I am a relative newbie - I am also running mythbuntu and recently upgraded to 8.10. I have apache installed and since the upgrade my virtual hosts are not working. The message "NameVirtualHost *:80 has no VirtualHosts" appears in the error.log file. Can you please advise exactly where you added your fix for this?
Much appreciated.
Ken
@Ken: I don't have access to my system at this moment, but I'm pretty sure the snippet you see above is the start of /etc/apache2/apache2.conf
Updated post with new fix.
Von,
I've finally fixed my similar issue! All my virtual .conf files started with the line "VirtualHost *" which seemed to work fine in Ubuntu 8.04, but this is what was causing the issue in 8.10.
I've now changed them all to "VirtualHost *:80" and it all works fine in 8.10.
I hope this may help someone else in this situation.
thx =)
Hmmm. It likewise worked for me, in that I stopped getting that warning message on apache2 reload. However, my vhosts wouldn't resolve correctly. In the apache docs it says that it is critical that the XXX in <VirtualHost XXX> match whatever XXX you used in ports.conf's NameVirtualHost XXX directive. So I tried the bare IP address (I'm only using one) with no port and it all works. Just in case someone else finds this post looking for help with this Ubuntu 8.10 Intrepid Apache2 Virtual Hosts problem.
Hi
My problem was exactly same.
Thanks. I also had NameVirtualHost in Ports.conf and when I commented it, it worked fine.
There should be only one NameVirtualHost statement in all conf files.
Alireza Kashian
thanx, saved my day dude, works like a charm
Thanks. overlooked forever and now i have more hair..
That helped, thanks!
thanks!
It works for me! ;) Thanks
Hi
Thanks this helped - commented out the line in ports.conf, and all is well!
Ok, problem solved! Thanks!
was trying to resolve my problem from past 70-80 minutes.
Finally with help of your article i fixed it.
:)
Thanks very much.
Post a Comment