I have various virtual hosts (vhosts) setup on an Apache 2.2 server such as:
examplea.domain exampleb.domain testsitea.domain testsiteb.domain testsite.domain othersitea.domain
On virtual hosts matching the regular expression "site[a-z].domain", I want to be able to serve the same file (say logo.gif) from /usr/local/apache/files/logo.gif .
If I wanted to do it on each site, I would obviously have to have something like:
<VirtualHost *:80> ServerName testsitea.domain ... Alias /logo.gif /usr/local/apache/files/logo.gif ... </VirtualHost> <VirtualHost *:80> ServerName testsiteb.domain ... Alias /logo.gif /usr/local/apache/files/logo.gif ... </VirtualHost>
But, for various reasons, I cannot ensure the VirtualHost will be setup with the alias in place and therefore I need to make it a global Apache setting, but with regular expression matching on the ServerName.
Can anyone point me in the correct direction if this is at all possible?