I'm using mod_vhost_alias and want to set dynamically open_basedir for each user. Something like
php_admin_value open_basedir /var/www/vhosts/%1
But it doesn't work. Because I have a lot of virtual hosts (4000-5000) mod_macro does not suit me.
I'm trying to apply this patch http://wiki.preshweb.co.uk/doku.php?id=apache:securemassvhosting
But with no success. Any suggestions?
You can use auto_prepend option in php.ini to supply script that will be executed first. There you can setup open_basedir via ini_set() function based on contents of $_SERVER array.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With