You are hereBlogs / hutcho's blog / Creating Virtual Hosts on your VPS

Creating Virtual Hosts on your VPS


By hutcho - Posted on 31 October 2009

The article (link below re: debian-administration) was pretty good, except the bit that said to create a file called virtual.conf. This pretty much didn't seem to work (maybe I did it wrong), but it just caused apache2 to throw the following error on restart:

[warn] NameVirtualHost *:80 has no VirtualHosts

By removing this file and specifying *:80 in each of the VirtualHosts sections instead of just using * fixed this problem. I also found the official documentation about virtual hosts enlightening.

References:
http://www.debian-administration.org/articles/412
http://httpd.apache.org/docs/2.2/vhosts/examples.html