vhost and open_basedir

Discussion in 'Installation/Configuration' started by Gimly, Mar 7, 2007.

  1. Gimly

    Gimly Member

    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
     
  2. martinfst

    martinfst New Member Moderator HowtoForge Supporter ISPConfig Developer

    /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.
     
  3. Gimly

    Gimly Member

    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: Mar 7, 2007
  4. martinfst

    martinfst New Member Moderator HowtoForge Supporter ISPConfig Developer

    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. ;)
     
  5. Gimly

    Gimly Member

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

    Ok no problems ^^
     
  6. penabur

    penabur New Member

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

    Gimly Member

    Thanks for your tip penabur :)
     

Share This Page