How to edit httpd.conf so open_basedir is turned off for a certain folder??

Discussion in 'Apache' started by 123GoToAndPlay, Jan 12, 2010.

  1. #1
    Hi,

    So with putty and root access i am able to get into /var/www/vhosts/mydomain.com/conf/

    and i guess i need to create a file called httpd.conf (or copy it)

    But what do i exactly put into httpd.conf so i can open_basedir() for a certain folder
    I do see a vhost.conf
    with
    
    <Directory /var/www/vhosts/mydomain.com/httpdocs>
    php_admin_value open_basedir /var/www/vhosts/mydomain.com/httpdocs:/tmp:/system
    
    <Directory/>
    
    Code (markup):
    Any tips??

    btw my php info says:
    open_basedir /var/www/vhosts/mydomain.com/httpdocs:/tmp no value
     
    Last edited: Jan 12, 2010
    123GoToAndPlay, Jan 12, 2010 IP
  2. hostechsupport

    hostechsupport Well-Known Member

    Messages:
    413
    Likes Received:
    23
    Best Answers:
    7
    Trophy Points:
    138
    #2
    Hello,

    Open basedir is applicable for entire domain and not a single folder. however you can do a testing by altering the path, suppose for example you have an folder name in your domain by name abc, then just alter the path

    php_admin_value open_basedir /var/www/vhosts/mydomain.com/httpdocs/abc:/tmp:/system

    After the save the conf file and restart apache and then check if the openbase dir has been set for that domain.

    Thank you.

    Regards,

    Hostech Support
     
    hostechsupport, Jan 13, 2010 IP