Now i have this:
<Directory ~ "^/home/.*">
php_flag open_basedir "/home/$1"
</Directory>
But that does not work. How do i make reference to that .*
?
Difficult. Apache doesn't interpret any variable configurations in directives. You should use %1
style RewriteCond backreferences in certain, or %{DOCUMENT_ROOT}
even. But many directives use static values.
Particularly PHPs Apache SAPI doesn't make an effort to interpret any %
or $
sequences.
You will find a couple of workarounds for auction on Serverfault: Using variables in Apache config files to reduce duplication?. But neither mod_macro
or mod_define
will accomplish what you would like. You'll have to define it for every home directory individually. (That's also what Plesk and Confixx do for multiple accounts.)