Web Hosting Forum | Lunarpages
News: October 6, 2008 - Submit Your Site for the October 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 12, 2008, 04:21:30 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: want to setup open_basedir in subdomain  (Read 404 times)
athena
Newbie
*
Offline Offline

Posts: 4


« on: March 23, 2008, 08:25:31 AM »

First I need to preface this by saying that my knowledge/comfort with command line SSH and command line is shaky at best, so if you respond please spell out rather explicitly what I'd need to do...

when I first setup my site on vps almost a year ago now, I remember having to go through the process of removing the open_basedir restriction on my domain... I recall it was a rather bumbling, painful process and, of course, a year later I remember very little about how I did it the first time around...

I need to do the same thing again to the subdomain that I've created. I dug up a tutorial and was able to browse around until I found the right directory, but I can't find the file it talks about.

Can I just copy my existing modified version of this file? ... /var/www/vhosts/mydomain/conf/httpd.include ... to ... /var/www/vhosts/mydomain/subdomains/dev/conf/ ?

If so, how would I do that?

If not, what should I be doing?


Help
Logged
perestrelka
Administrator
Master Jedi
*****
Offline Offline

Posts: 1058



« Reply #1 on: March 25, 2008, 09:40:46 PM »

Hello,

According to the Plesk Knowledge Base (http://kb.swsoft.com/en/432), you need to modify the vhost.conf file for your domain and then re-generate Apache configuration in order to properly modify open_basedir setting. To change open_basedir setting for your subdomain, SSH into the server as root, open the subdomain's vhost.conf in a editor:

Code:
nano /var/www/vhosts/domain.tld/subdomains/subdomain/conf/vhost.conf

and put in the following content into it replacing the allowed paths in open_basedir and setting Directory to the real subdomain root directory:

Code:
<Directory /var/www/vhosts/domain.tld/subdomains/subdomain/httpdocs>
php_admin_value open_basedir "HTTPD_VHOSTS_D/domain.com/subdomains/subdomain/httpdocs:/tmp:/ADD_PATH"
</Directory>

If you need to disable open_basedir protection for the domain completely replace the open_basedir path with "none" word:

Code:
php_admin_value open_basedir none

Now you will need to execute:

Code:
/usr/local/psa/admin/sbin/websrvmng -v -a

to re-generate Apache configuration and apply the adjustment you made to httpd.include of subdomain.

Finally, restart Apache:

Code:
/etc/init.d/httpd stop
/etc/init.d/httpd start

and you should be good to go.

I hope this helps. Please advise if you have any further questions.
Logged

Kind Regards,
Vlad Artamonov
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM