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

overriding open_basedir across subdomains -- vhost.conf doesn't work

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

  1. calzone

    calzone Guest

    0
     
    so I've tried everything I've seen written on this board so far.

    I created my vhost.conf file inside the subdomain, in it, I added:

    Code:
    <Directory /var/www/vhosts/domain.com >
            php_admin_flag engine on
            php_admin_value open_basedir none
    </Directory>
    I already ran /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=domain.com

    And I looked inside /var/www/vhosts/domain.com/conf/httpd.include and confirmed that it is in fact including vhost.conf

    I have since restarted apache and rebooted the server, but no dice. I'm still bound by the open_basedir declared by plesk in /var/www/vhosts/domain.com/conf/httpd.include

    This seems especially silly since subdomains really should be able to share scripts with eachother.

    What gives?
     
  2. hardweb

    hardweb Guest

    0
     
    Use:

    <Directory /var/www/vhosts/domain.com/httpdocs>
    php_admin_flag engine on
    php_admin_value open_basedir none
    </Directory>
     
  3. calzone

    calzone Guest

    0
     
    Ok, I will try that, thank you... it seems very sensible...

    But, just to make things a little bit more complicated, I don't really want to turn off open_basedir, I want to set it to the root of the vhost.

    However, to help me troubleshoot, I was trying to see if I could even just simply turn it off.

    So, the question will be... if this does work, do I need to turn it off, and then turn it back on based on the new dir where I want it to take effect?

    thank you for your help :)
     
  4. calzone

    calzone Guest

    0
     
    Ok, I am realizing this seems to be more of an apache config issue than something related to plesk.

    However, I'm hoping you can explain the logic above, because while it worked for my subdomain, it has not worked for my main domain.

    ** EDIT **

    Ok, I got it working for my subdomain, and the portion below, which I posted earlier, is WRONG. It turns out I had a different include path error in my document and was attributing it to open_basedir.

    HOWEVER, I still want to understand the logic used for choosing that particular directory path. I additionally tried to define it without enclosing it in a directory path, but that didn't work :confused:

    ** /EDIT **
    And that's where my confusion lies: why do I even have to define this under <Directory ...> instead of simply putting one line in each of my vhost.conf that says: php_admin_value open_basedir none? Why doesn't that work?

    :) thank you
     
  5. rr1024

    rr1024 Guest

    0
     
    httpd.include
    # ATTENTION!
    # DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
    # FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
    # MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
    # FOLLOWING FILE(S):
    # /var/www/vhosts/mysite.com/conf/vhost.conf
    # /var/www/vhosts/mysite.com/conf/vhost_ssl.conf
    # /var/www/vhosts/mysite.com/subdomains/<subdomain-name>/conf/vhost.conf

    However, editing or adding those files to the directory would not turn off open base directory. so I had to edit the httpd.include file directly.

    Find php_admin_value open_basedir "/var/www/vhosts/mydomain.com/httpdocs:/tmp"
    replace with
    #php_admin_value open_basedir "/var/www/vhosts/mydomain.com/httpdocs:/tmp"

    does anyone else know how other ways to turn off open base other than editing the file they tell us not too.....I believe this is a Plesk issue because it says so in httpd.include
     
Loading...