Page 1 of 1

How to set up virtual hosts?

PostPosted: 10. March 2008 09:14
by zzeljko
This is the message I get when I run Apache:
[Mon Mar 10 08:07:55 2008] [warn] NameVirtualHost has no VirtualHosts

The relevant info from httpd.conf is:
NameVirtualHost "localhost:80"
NameVirtualHost ""
<VirtualHost "localhost:80">
<VirtualHost "">

It all works fine, and I can access both sites, but I don't quite understand the meaning of the warning message.

What is the best practice for setting up virtual hosts? Should I (and why) use IP addresses in NamVirtualHost directives, etc?