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

Add default path to open_basedir

Discussion in 'Plesk for Linux - 8.x and Older' started by ryanmhubbard, Jun 3, 2007.

  1. ryanmhubbard

    ryanmhubbard Guest

    0
     
    Is there a way to add a path to the openbase_dir for domains. That way I don't have to keep adding a vhost.conf file for every domain just to add the pear directory?

    If this is not possible is there a way to automate the creation of a vhost.conf file in Plesk for a created domain?
     
  2. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    You can create a conf/vhost.conf file in the skeleton so newly created domains will have the entries ready to go.
     
  3. ryanmhubbard

    ryanmhubbard Guest

    0
     
    Thanks. Is there any documenation on this, for example variable names for the file?

    Do you know how you would create it so the domain name and directories are inserted properly into the file?
     
  4. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Hm yes... There are variables available, but I believe they are not documented anywhere that I know of. I only remember @domain_name@ right now. Maybe that is the only one. Could be enough though?
     
  5. ryanmhubbard

    ryanmhubbard Guest

    0
     
    It would be good for top level domains but for subdomains it won't work because they exist in different directories.

    Is there a file on the server somewhere that Plesk uses that might have more listed in it?
     
  6. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Maybe, but you never know if it's encoded or not...
     
  7. MacDeath

    MacDeath Guest

    0
     
    Could you please help and point me to the skeleton files?

    I added pear include path into the php.ini file, I then added the path to open_basedir in each httpd.include file, however, I have to set every website to safe_mode = off for this to work, and the httpd.include is rewritten...

    Please help
     
  8. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Like the the comments in the httpd.include (and this thread) say: do not edit httpd.include. Create a vhost.conf file to add or overwrite settings.

    There is a .skel directory in your vhosts directory. You can also check out the documentation that tells you how to use your own skeletons via the Plesk web interface.
     
  9. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Hi everyone,

    Has anyone had any luck on this?

    In my .Skel directory there are no conf files or folders. So I would assume that I Just create a conf folder there, and stick a vhost.conf file in there with my values.

    But I am unclear as how to make it dynamic.

    Should I just put in the following?

    Code:
    <VirtualHost Server_IP_Goes_Here:80>
    php_admin_value open_basedir  ".:/usr/share/pear:/var/lib/php/session:/var/www/vhosts/@domain_name@/includes:/var/www/vhosts/@domain_name@/httpdocs:/tmp"
    </VirtualHost>
    
    Would that be the right way?
     
  10. flupke

    flupke Guest

    0
     
  11. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    That looks like manually and statically setting a value, which is not something I like to do as good practice.
     
  12. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    But it does show you what your vhost.conf should look like.
     
  13. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Yes breun, it does show what it could be, not necesarily what what it should be.

    What the contents are is one thing that can be determined on an individual basis, but the variable names for use in skeleton files are what is important and lacking.
     
  14. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    There is no one way it should be. If that was the case then there would be no need to customize this.

    What I meant was that the KB article shows you to use php_admin_flag inside a Directory statement (and not a VirtualHost statement).

    It appears it is true that the skeleton variables are not documented, but you already found out about @domain_name@ it seems and I believe that is all you need.
     
  15. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Boy your a great help.
     
Loading...