View Full Version : vhost and open_basedir
Gimly
7th March 2007, 22:33
Hi All,
I use open_basedir for block my customers on their dir with this on vhost :
<Directory /var/www/web*/>
php_admin_value open_basedir /var/www/web*/:/tmp:/usr/share/pear/:/var/lib/php5/
</Directory>
Actually I add it manually in /etc/apache2/vhosts/Vhosts_ispconfig.conf, but where can I found the ispconfig file base who contain the original vhost for automatic add this in vhost ?
Thanks for your answers
martinfst
7th March 2007, 22:36
/etc/apache2/vhosts/Vhosts_ispconfig.conf will change with every site you create of every change you make to any website. I suggest you edit the /etc/apache2/apache2.conf.
Gimly
7th March 2007, 23:00
yes, but I want to block users in their dir for exemple /var/www/web3/ for web3 but if I juste use open_basedir /var/www/ it can view the config.php of /var/www/web6/, thus I block in the vhost, except if there is better, I am taking.
What do you think about it ?
Thansk for your answers
--edit : I've found the file, it on /root/ispconfig/isp/conf/vhost.conf.master and now it's OK --
martinfst
8th March 2007, 10:13
--edit : I've found the file, it on /root/ispconfig/isp/conf/vhost.conf.master and now it's OK --I thought you wanted the wildcard option, so that's why I suggested the main apache2.conf file. You're right if you want to set it per website: edit the master template of ISPConfig. Beware that with an upgrade your change gets lost. Please 'vote' for the RFE to add the possibility to create custom templates that will stay, even with upgrades of ISPConfig. ;)
Gimly
8th March 2007, 14:45
Ok, sorry if you don't understand, I d'ont speak very well english, I'am french user XD.
Please 'vote' for the RFE to add the possibility to create custom templates that will stay, even with upgrades of ISPConfig
Ok no problems ^^
penabur
3rd July 2007, 10:35
Hi All,
I use open_basedir for block my customers on their dir with this on vhost :
<Directory /var/www/web*/>
php_admin_value open_basedir /var/www/web*/:/tmp:/usr/share/pear/:/var/lib/php5/
</Directory>
Actually I add it manually in /etc/apache2/vhosts/Vhosts_ispconfig.conf, but where can I found the ispconfig file base who contain the original vhost for automatic add this in vhost ?
Thanks for your answers
Check inside file /root/ispconfig/scripts/lib/config.inc.php
See line with:
php_admin_value open_basedir ".$mod->system->server_conf["server_path_httpd_root"]."/"."web".$web["doc_id"]."/
Add or substract any directory you like, besides the default vhost document root.
BTW, it is part of the code right above it, therefore it is only a PHP string concatenation.
Hope it helps
penabur
Gimly
19th August 2007, 13:59
Thanks for your tip penabur :)
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.