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

Yet another basedir thread

Discussion in 'Plesk for Linux - 8.x and Older' started by MattElmore, Dec 6, 2005.

  1. MattElmore

    MattElmore Guest

    0
     
    Before you flame me for posting inquiries regarding a topic that has been beaten to death, please hear me out. :)

    We are attempting to modify the basedir for a domain on our Plesk 7.5.4 server.

    We include in /usr/local/psa/home/vhosts/domain.com/conf/vhost.conf:

    Code:
    <Directory /usr/local/psa/home/vhosts/domain.com/httpdocs>
            php_admin_flag engine on
            php_admin_value open_basedir "/usr/local/psa/home/vhosts/domain.com"
    </Directory>
    
    We then execute the command:

    Code:
    /usr/local/psa/admin/bin/websrvmng -u --vhost-name=domain.com
    
    Which returns no output.

    However, this does not appear to update httpd.include:

    Code:
    # grep basedir httpd.include
                    php_admin_value open_basedir "/usr/local/psa/home/vhosts/domain.com/httpdocs:/tmp"
                    php_admin_value open_basedir "/usr/local/psa/home/vhosts/domain.com/httpdocs:/tmp"
                    php_admin_value open_basedir "/usr/local/psa/home/vhosts/domain.com/httpdocs:/tmp"
                    php_admin_value open_basedir "/usr/local/psa/home/vhosts/domain.com/httpdocs:/tmp"
    
    Then restarting apache. Still the same thing.

    Does anyone have any suggestions as to what's going on?
     
  2. MattElmore

    MattElmore Guest

    0
     
    Well, I found a solution minutes after posting this.

    If I executed the following:

    Code:
    /usr/local/psa/admin/bin/websrvmng -u --vhost-name=haedwards.com -r
    
    (Note the -r to restart httpd)

    It works with the above, but if I omitted that and restarted httpd via the admin interface the changes were not reflected.

    Go figure...
     
  3. adc124

    adc124 Guest

    0
     
    I'm still having trouble with this...

    For a start, there is no vhost.conf file in the directory mentioned. And even when i create it with the appropriate code inside, and restart httpd as show, the http.include file is not altered and the open_basedir remains the same!

    Can anyone help with this??
     
  4. darrensw@

    darrensw@ Guest

    0
     
    Basedir Solution

    Hi All

    This is the solution once and for all - works for me anyway - did this before I dumped my host, firstly for having tech support from hell and secondly because Plesk is so hard to use it was wasting way too much of my time... hope this helps:

    I'm calling the include directory php for the sake of this email, and the ftp login is ftpme

    * To be able to put the php directory on the same level as httpdocs you must firstly do the following:
    o SSH into the server
    o Navigate to: /var/www/vhosts/
    o Type: chown ftpme thedomainname.com
    o FTP php directory in
    * Now, change the ownership of the php directory and all it's content to the same as the FTP login: e.g. chown -R ftpme /var/www/vhosts/thedomainname.com/php
    * Create and save a file named vhost.conf in /var/www/vhosts/thedomainname.com/conf and put the following into it:

    <Directory /var/www/vhosts/thedomainname.com/httpdocs>
    php_admin_value open_basedir "/var/www/vhosts/thedomainname.com/httpdocs:/var/www/vhosts/thedomainname.com/php"
    </Directory>

    * At SSH root type: /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=thedomainname.com
    * At SSH root type: /sbin/service httpd restart
    * Run phpinfo(); from any page you'll see that the open_basedir value has been changed to: /var/www/vhosts/artistesuk.com/httpdocs:/var/www/vhosts/artistesuk.com/php

    Things to note - you must chown the php directory and all it's files as they will not be called into pages if you do not...for some reason.

    As I say, works for me - hope this helps.

    Darren
     
  5. adc124

    adc124 Guest

    0
     
    Hi,

    Managed to sort it after considerable fiddling and a very late night! Anyway, thanks for your help!
     
Loading...