Is there a way to do this? I'd like for my assets to be served from a different document root, and I'm not sure if Apache has directives for that.
views:
21answers:
1
+1
A:
To serve whole directories from a different location, there's Alias
:
Alias /assets /path/to/assetsdir
works in httpd.conf
only, though, if you want to point outside the web root.
For specific files there is AliasMatch
.
Pekka
2010-07-03 17:42:37
I'm looking for something more like how nginx allows. So that if the filetype matches a certain group, then the document root is a different one.
Matthew
2010-07-03 18:05:07
@Matthew there's `FilesMatch`: http://httpd.apache.org/docs/2.2/mod/core.html#filesmatch but I don't think it will allows specifying a different document root altogether. I think `AliasMatch` with a regular expression that catches the file types you specify is going to be your best bet.
Pekka
2010-07-03 18:09:41