Apache server alias wildcard
Something I've learnt recently that I might be the last to know but you can use wildcards (*) in the ServerAlias in Apache. In the past I've done something along the lines of
ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com www.example.co.uk example.co.uk
</VirtualHost>
1<VirtualHost *:80>
2 ServerName example.com
3 ServerAlias www.example.com www.example.co.uk example.co.uk
4</VirtualHost>
Really all you need to do is:
ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org
<VirtualHost *:80>
ServerName example.com
ServerAlias *.example.*
</VirtualHost>
1<VirtualHost *:80>
2 ServerName example.com
3 ServerAlias *.example.*
4</VirtualHost>
Hope this helps someone else