What is the difference between "NameVirtualHost *" and "NameVirtualHost 0.0.0.0"? Both seem to be implementing name-based virtualhosts, both seem to work. How does "0.0.0.0" become a wildcard?
What is the difference between "NameVirtualHost *" and "NameVirtualHost 0.0.0.0"? Both seem to be implementing name-based virtualhosts, both seem to work. How does "0.0.0.0" become a wildcard?
I believe they are the same from brief look at the code:
Then:
So it looks like * just gets parsed to 0.0.0.0 in this instance, and if it actually is
0.0.0.0
it will get passed as such (Although maybe APR_INET vs. APR_UNSPEC matters, but I think that might just be IPv compatibility thing, so maybe there is a difference in that IPv4 when 0.0.0.0 and IPv6 is possible when *, not sure). But I could be interpreting this totally wrong, you can see for yourself inserver/vhost.c
.