I need a way to make all server names point to one document root without the need to manually type them all, maybe something like this:
<VirtualHost *:80>
DocumentRoot /www/example1
ServerName *
</VirtualHost>
Will that work?
I need a way to make all server names point to one document root without the need to manually type them all, maybe something like this:
<VirtualHost *:80>
DocumentRoot /www/example1
ServerName *
</VirtualHost>
Will that work?
No, you can't write
ServerName *
.All you have to do is put the DocumentRoot in the first virtual host that gets read in your configuration. The Apache Name-Based Virtual Hosts guide explains that any server whose name doesn't match the ServerName in any virtual host configuration will be served by the default host, so it will get the DocumentRoot you want.