#1  
Old 7th March 2007, 21:33
Gimly Gimly is offline
HowtoForge Supporter
 
Join Date: Mar 2007
Location: France
Posts: 144
Thanks: 26
Thanked 4 Times in 4 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 7th March 2007, 21:36
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

/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.
Reply With Quote
  #3  
Old 7th March 2007, 22:00
Gimly Gimly is offline
HowtoForge Supporter
 
Join Date: Mar 2007
Location: France
Posts: 144
Thanks: 26
Thanked 4 Times in 4 Posts
Default

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 --

Last edited by Gimly; 7th March 2007 at 22:15.
Reply With Quote
  #4  
Old 8th March 2007, 09:13
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

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.
Reply With Quote
  #5  
Old 8th March 2007, 13:45
Gimly Gimly is offline
HowtoForge Supporter
 
Join Date: Mar 2007
Location: France
Posts: 144
Thanks: 26
Thanked 4 Times in 4 Posts
Default

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 ^^
Reply With Quote
  #6  
Old 3rd July 2007, 09:35
penabur penabur is offline
Junior Member
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Post 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
Reply With Quote
  #7  
Old 19th August 2007, 12:59
Gimly Gimly is offline
HowtoForge Supporter
 
Join Date: Mar 2007
Location: France
Posts: 144
Thanks: 26
Thanked 4 Times in 4 Posts
Default

Thanks for your tip penabur
__________________
4 virtual machines with Debian Lenny updated on proxmox (openvz) with ISPConfig 3.0.1.6

ns1 : http(s), ftp(s), DNS Master, ISPConfig
sql : MySQL database users
mail : All mail system
ns2 : DNS Slave

ISPConfig.be Admin's
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:52.


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