If I have 3 domains, domain1.com, domain2.com, and domain3.com, is it possible to set up a default virtual host to domains not listed? For example, if I would have:
DocumentRoot /www/docs/domain1
ServerName domain1
ServerAlias host
DocumentRoot /www/docs/domain2
ServerName domain2
ServerAlias host
DocumentRoot /www/docs/everythingelse
ServerName *
ServerAlias host
If you register a domain and point it to my server, it would default to everythingelse showing the same as domain3. Is that possible?
Answer
Yes, that should work, except ServerAlias should be "*", with ServerName set to an actual hostname. You might need to make sure that VirtualHost is the very last loaded...
Comments
Post a Comment