Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to use the string matched by a wildcard in an Apache <Directory /> directive further on in the configuration? Ideally, I'd like to do something like this:

<Directory /home/*/public_html>
    RUidGid $1 $1
    php_admin_value open_basedir /home/$1/

…where $1 is whatever was matched by the *.

share|improve this question

It is impossible. Maybe right for you mod_macro or "Dynamically configured mass virtual hosting"

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.