• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Perm Change To Open BaseDir Paths For Server Wide, how?

B

bweeb2

Guest
I was having problems getting a script to work as its doing php includes from outside its directory to another directory.

Using the below thread I got that to work but editing a vhost.conf file to allow that path for that one domain.

http://forum.swsoft.com/showthread.php?threadid=29346&highlight=basedir

THE QUESTION
We have like 50 domains to do this too that draw template info out of a single domain's structure, how can we add a path to Plesk's open basedir structure so that it replicates this to every domain setup on the server?
 
I've looked through the template configuration and unfortunately I don't think it can be done through plesk.

I think the easiest way is to just go through and edit each domain manually. When logged in as root, edit the vhost.conf (or httpd.include if vhost doesn't exist) file in the conf folder of the domain.

On my VDS, I change

<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_value open_basedir "/var/www/vhosts/domain.com/httpdocs:/tmp"
</IfModule>

to

<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_value open_basedir "/var/www/vhosts/domain.com:/tmp"
</IfModule>

Simply go one step farther and set:

open_basedir "/var/www/vhosts:/tmp"

Save the file and restart Apache.

Regards,
Jeff Wickenheiser
 
Yep after talking to several plesk experts its not possible which is dumb.

So I have to edit every vhost.conf file, when I should be able to make a global edit to add a folder.
 
First of all, I am new to PLESK, so forgive uneducated comments.


I hosting multiple domains and want the same setup for each of them so...

1. Isn't there SOME WAY that we can push updates to the vhost.conf files through a free/commercial package add-on?

2. If #1 is absolutely not available, how can I make it so that each new domain I add has my favorite vhost.conf file included by default?

3. If #2 is not possible... is there something in the works for version 8 of PLESK to remedy this situation?
 
hi

i've just found the solution in another thread (got the some problem for including typo3 sources in open base dir path)

you can do it in vhost.conf and use the placeholder:

@domain_name@

example:

php_admin_value open_basedir "/usr/src/typo3:/data/vhosts/@domain_name@/httpdocs"

then just include conf/vhost.conf in a skeleton and new domains will be created with this open_basedir.

plesk is parsing the @domain_name@ and substitutes it with the customer domain..

if you understand german this link maybe helpful:
http://pleskwiki.de/index.php/Eigene_Einstellungen_fuer_neue_Domains

greets
 
Originally posted by roeschu
hi

i've just found the solution in another thread (got the some problem for including typo3 sources in open base dir path)

you can do it in vhost.conf and use the placeholder:

@domain_name@

example:

php_admin_value open_basedir "/usr/src/typo3:/data/vhosts/@domain_name@/httpdocs"

then just include conf/vhost.conf in a skeleton and new domains will be created with this open_basedir.

plesk is parsing the @domain_name@ and substitutes it with the customer domain..

if you understand german this link maybe helpful:
http://pleskwiki.de/index.php/Eigene_Einstellungen_fuer_neue_Domains

greets

Thank you so much... I am using Typo3 as well. I don't speak German but used google to translate. I also PM'd you with some other unspeakably newbie questions too embarrassing to post here ;)
 
Back
Top