My Apache Virtual Hosts config currently has several repeats of this;
<VirtualHost *:80> ServerName example1.com ServerAlias www.example1.com DocumentRoot /home/example1.com/www LogLevel warn ErrorLog /home/example1.com/logs/error.log CustomLog /home/example1.com/logs/access.log combined Alias /dev /home/example1.com/dev ScriptAlias /cgi-bin/ /home/example1.com/cgi-bin </VirtualHost>
How would one go about changing that so all the 'example1.com' instances are replaced with whatever domain the user is currently viewing?
I know of mod_vhost_alias, but I don't see any mention of it being able to do logs or alias (aside from ScriptAlias) dynamically as well. Is there some way to accomplish that? I'd rather not sacrifice separate logs for this.