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 subdomain

Discussion in 'Plesk for Linux - 8.x and Older' started by tom1502, Jun 19, 2005.

  1. tom1502

    tom1502 Guest

    0
     
    Hi,

    how do i set open_basedir restrictions for subdomains?
    i have been writing a vhost.conf and put it into the conf directory of the subdomain, and rebooted the whole server, because i dont know the command to make the vhosts.conf active, but nothing changed.
    What have i done wrong?!?!

    Thx

    Thomas
     
  2. Whistler

    Whistler Guest

    0
     
    RTFM?

    Hint: <path_to_psa>/admin/bin/websrvmgr --vhost-name=<the main domain of your subdomain>

    :)
     
  3. AllanH

    AllanH Guest

    0
     
    This is the most recent topic I can find that deals with this, so here I am. Disclaimer: I'm pretty n00b to server management.

    I am running on a godaddy virtual dedicated server using plesk 7.5.2.

    I wish to disable open_basedir on a subdomain.

    I have created the vhost.conf file in my subdomain's /conf directory and added the appropriate rule as outlined in detail in several posts here and elsewhere.

    I have run websrvmng and confirmed that the include line is present in the subdomain's virtual host directive in the httpd.include file for the domain.

    All the paths seem correct.

    I still get the "open_basedir in effect" errors when I run my php script.

    I don't suppose there are any known issues with this? Needless to say, I am very frustrated.

    EDIT:
    Here's the contents of my vhosts.conf file:
    Code:
    <Directory /home/httpd/vhosts/allanh.org/subdomains/weblog/httpdocs/>
    
    php_admin_value open_basedir none
    
    </Directory>
    So after doing all of the above, I get this error:

    On every page I try to load suddomain-wide :(

    Once I remove the php_admin_value line from the vhost.conf file, everything returns to "normal".

    I am SO confused. Any help would be greatly appreciated.

    Sleep time for me.

    Cheers!
     
  4. jamesyeeoc

    jamesyeeoc Guest

    0
     
    allanh - Try the following in the vhost.conf file for the MAIN domain conf directory:

    <Directory /home/httpd/vhosts/allanh.org/subdomains/weblog/httpdocs>
    php_admin_flag engine on
    php_admin_value open_basedir none
    </Directory>

    Although it is better to specify the directories you wish to allow, rather than removing the restriction by using 'none'.

    Notice there is no '/' at the end of the <Directory ... > line.

    And don't forget to run:
    /usr/local/psa/admin/bin/websrvmng -a -v

    and restart apache.

    If you prefer to just reconfigure the one domain, use Whistler's post above as a reference.
     
  5. AllanH

    AllanH Guest

    0
     
    Wow! Thanks for the super-fast reply :D

    I know I really shouldn't have edited my first post so long after posting it. Won't do that again.

    I've redone my vhost.conf file as you outlined above to the spacing, but now I get this:

    Even for the index page and any other pages I try to load :(

    Thanks again!!
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Actually the blank lines have nothing to do with it. Did you remove the trailing '/' ??

    And you are NOT using a Windows editor to modify the file are you?

    I also modified my post above. Try putting it into the MAIN domain's vhost.conf file to see if that helps. Again, I do NOT recommend using 'none', it is better to put the exact paths which you need to allow, rather than removing the restriction altogether.

    php_admin_value open_basedir /home/httpd/vhosts/allanh.org/subdomains:/tmp:/usr/share/pear

    or

    php_admin_value open_basedir /home/httpd/vhosts/allanh.org/httpdocs:/tmp:/usr/share/pear

    or

    php_admin_value open_basedir /home/httpd/vhosts/allanh.org:/tmp:/usr/share/pear
     
  7. AllanH

    AllanH Guest

    0
     
    Should I be deleting the vhost.conf from the subdomain directory? I did that and now I get this:

    I definitely didn't edit any of the wordpress files.

    Many thanks.
     
  8. AllanH

    AllanH Guest

    0
     
    hang on, I didn't see your second post. Lemme play with that.

    And no, I'm on OSX using VIM to edit the files though SSH :)
     
  9. AllanH

    AllanH Guest

    0
     
    Yes, I removed the trailing slash.

    And I'm the only one on my server and I'd rather just disable the restriction once and for all since I've run into this now with a couple of plug-ins I'd like to use and it's more of a pita than it's worth IMHO :) Thanks for the warnings though.

    Still need to try the lines from your second post ...
     
  10. AllanH

    AllanH Guest

    0
     
    Still have the above "Cannot instantiate" error on all pages after trying all three lines above.

    To make matters worse, I can't seem to get it back to normal by deleting the files anymore :(
     
  11. AllanH

    AllanH Guest

    0
     
    I manually removed the offending plugin file and got my site back :) I'm done for the night. It's 3:33AM where I am (Victoria BC) and I've been working on this for 4 hours now, so it's definitely time to sleep and get back to this tomorrow.

    Thanks a ton for your help jamesyeeoc :D
     
  12. AllanH

    AllanH Guest

    0
     
    *bump* - anyone? I've tried virtually everything to get this working, but all anything seems to do is bugger everything up.

    Is there possibly an issue with the "virtual" part of my virtual dedicated server?
     
  13. jamesyeeoc

    jamesyeeoc Guest

    0
     
Loading...