Using Alias in Apache ONLY if local directory not present?

Posted by Andrew E. on Stack Overflow See other posts from Stack Overflow or by Andrew E.
Published on 2009-01-06T22:36:42Z Indexed on 2010/05/09 11:08 UTC
Read the original article Hit count: 254

Filed under:
|
|
|
|

Hey all,

We're running a reseller web host, and aliasing a particular directory for ALL the sites within. This is all happening through WHM/Cpanel, which could possibly complicate my question.

  1. We want all hosts to run their "/concrete" directory through a shared location on the server. This is working fine by adding "Alias /concrete/ "/usr/local/share/concrete5/concrete-latest/concrete/" to the apache include editor in WHM.

  2. However, if a local concrete/ directory exists within the particular webroot of the virtual host, we'd rather use that than "/concrete" globally. It would also be nice if we could make this alias change in the context of the virtual host, within WHM (and I haven't found a great way to modify virtual host sections in WHM without hacking a file that I don't believe we're supposed to hack.)

Thoughts?

© Stack Overflow or respective owner

Related posts about apache

Related posts about mod-alias