Apache "Include" directive with wildcards
Friday, 20 July 2012
Apache's include directive does not accept wildcards, so something like this won't be allowed:
Include /srv/www/vhosts/*/conf/vhost.conf
You can use mod_perl to realize this. Additionally, the following example does a simple permission check to ensure that the included file has not been modified by an ordinary user:
<perl> if ($stat->uid != 0 || $stat->gid != 0) { next; } if ($stat->mode & 0002) { next; } } </perl>