-1

When declaring a VirtualHost does it matter if I use an asterisk or an IP if I only have one IP I'm working with? Note, I do have several domains.

The reason I ask is because I get warnings when restarting apache2 and I'd like to get rid of them. Also, when should I use a * vs using an IP?

The warnings I get on # /etc/init.d/apache2 restart

[Wed Mar 05 08:39:07 2014] [warn] NameVirtualHost xx.xx.xx.xx:443 has no VirtualHosts
[Wed Mar 05 08:39:07 2014] [warn] NameVirtualHost *:80 has no VirtualHosts
 ... waiting [Wed Mar 05 08:39:08 2014] [warn] NameVirtualHost xx.xx.xx.xx:443 has no VirtualHosts
[Wed Mar 05 08:39:08 2014] [warn] NameVirtualHost *:80 has no VirtualHosts
Jacksonkr
  • 465
  • 1
  • 7
  • 16

1 Answers1

0

This is not a real answer but you should read this page of the apache Documentation which contains very good example : http://httpd.apache.org/docs/2.2/vhosts/examples.html

by looking at this example you will probably find out what is best for your setup between name-based vhost and IP-based virtual hosts

The main idea is to use name based vhost if you want to host multiple website (eventually from different domain) and using only one single IP.

using * or ip, or default, the answer can vary from the needs, for me I rather use IP to avoid surprise if sb add an interface on the servers.

Mike
  • 61
  • 6