1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

open_basedir for subdomains?

Discussion in 'Plesk for Linux - 8.x and Older' started by tincup, Apr 24, 2006.

  1. tincup

    tincup Guest

    0
     
    Hi. I don't know if this is off-topic in here but my web server is Plesk controlled.

    I need to extend the PHP open_basedir of one of my subdomains by "/usr/share/php". So I create a file "vhost.conf" at

    /var/www/vhosts/domainname.com/subdomains/subdomainname/httpdocs

    with the contents

    <Directory /var/www/vhosts/domainname.com/subdomains/subdomainname/httpdocs>
    php_admin_value open_basedir "/var/www/vhosts/domainname.com/subdomains/subdomainname/httpdocs:/tmp:/usr/share/php"
    </Directory>

    This did not work. Does anyone know why?
     
  2. crowsfan85

    crowsfan85 Guest

    0
     
    Confirmed: This does not work.

    Plesk? Anybody!
     
  3. crowsfan85

    crowsfan85 Guest

    0
     
    Ok, got it working. This is what I did...

    contained the php_admin_value open_basedir directive in:

    <Directory foo/bar/httpdocs>
    <IfModule sapi_apache2.c>
    php_admin_flag engine on
    php_admin_value open_basedir "blabla"
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_flag engine on
    php_admin_value open_basedir "blabla"
    </IfModule>
    </Directory>

    Hope it helps. I'm sure there's some redundancy there that can be cut out.
     
  4. adc124

    adc124 Guest

    0
     
    I have copied your code exactly, placing it in a vhost.conf file in the httpdocs folder of the subdomain as described in the first post and nothing happens!

    I have restarted the httpd service and ran the following command as suggested in another thread:
    /usr/local/psa/admin/sbin/websrvmng -a -v

    But still nothing!

    Can anyone help!
     
  5. crowsfan85

    crowsfan85 Guest

    0
     
  6. adc124

    adc124 Guest

    0
     
    Thanks for your reply. Should have posted back to let everyone know I sorted it in the end after a bit of trial and error and a late night!
     
Loading...