HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   vhost and open_basedir (http://www.howtoforge.com/forums/showthread.php?t=11198)

Gimly 7th March 2007 21:33

vhost and open_basedir
 
Hi All,

I use open_basedir for block my customers on their dir with this on vhost :

Code:

<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 21: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 22: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 09:13

Quote:

--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 13:45

Ok, sorry if you don't understand, I d'ont speak very well english, I'am french user XD.

Quote:

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 09:35

Vhost and open_basedir
 
Quote:

Originally Posted by Gimly
Hi All,

I use open_basedir for block my customers on their dir with this on vhost :

Code:

<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 12:59

Thanks for your tip penabur :)


All times are GMT +2. The time now is 16:59.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.