I would like to map multiple directories to the same location with Apache, expecting a behaviour similar to this: suppose that the /static
location is to be backed by directories /srv/static1
and /srv/static2
. Then if /static/image.png
is requested, I would like Apache to check for files /srv/static1/image.png
and /srv/static2/image.png
, in that order. First file found is returned; if neither is found, classical error 404 is sent back.
Of course a solution is to use a script to make a directory of symlinks that point to the right location and use that one, for example in an Alias
directive. I wonder if there is a more direct way that doesn't require me to deploy additional machinery.
Thanks!