• 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

Subdomains config and httpdocs directory.

D

Dimitriy

Guest
Hello, there is a subdomain, for him to change the open_basedir, but it does not work.
I tried to prescribe a rule to:
/var/www/vhosts/DOMAIN/conf, /var/www/vhosts/DOMAIN/subdomains/SUBDOMAIN/conf
# ATTENTION!
# DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
# FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
# MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
# FOLLOWING FILE(S):
#/var/www/vhosts/DOMAIN/conf/vhost.conf

<Directory /var/www/vhosts/DOMAIN/ads>

<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir /var/www/vhosts/DOMAIN/SUBDOMAIN/:/tmp/:/var/www/vhosts/DOMAIN/
</IfModule>

<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir /var/www/vhosts/DOMAIN/SUBDOMAIN/:/tmp/:/var/www/vhosts/DOMAIN/
</IfModule>


Options -Includes -ExecCGI

</Directory>

<Directory /var/www/vhosts/DOMAIN/httpdocs>

<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir /var/www/vhosts/DOMAIN/SUBDOMAIN/:/tmp/:/var/www/vhosts/DOMAIN/
</IfModule>

<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir /var/www/vhosts/DOMAIN/SUBDOMAIN/:/tmp/:/var/www/vhosts/DOMAIN/
</IfModule>


Options -Includes -ExecCGI

</Directory>

<Directory /var/www/vhosts/DOMAIN/subdomains/SUBDOMAIN>

<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir /var/www/vhosts/DOMAIN/SUBDOMAIN/:/tmp/:/var/www/vhosts/DOMAIN/
</IfModule>

<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir /var/www/vhosts/DOMAIN/SUBDOMAIN/:/tmp/:/var/www/vhosts/DOMAIN/
</IfModule>


Options -Includes -ExecCGI

</Directory>
<Directory /var/www/vhosts/DOMAIN/subdomains/SUBDOMAIN/httpdocs>

<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir /var/www/vhosts/DOMAIN/SUBDOMAIN/:/tmp/:/var/www/vhosts/DOMAIN/
</IfModule>

<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir /var/www/vhosts/DOMAIN/SUBDOMAIN/:/tmp/:/var/www/vhosts/DOMAIN/
</IfModule>


Options -Includes -ExecCGI

</Directory>

More httpdocs directory subdomain is located in:
/var/www/vhosts/DOMAIN/SUBDOMAIN (this is the httpdocs directory subdomain)
but the directory conf, cgi-bin, error_docs are in:
/var/www/vhosts/DOMAIN/subdomains/SUBDOMAIN
is this correct?

P.S. sorry, bad English :)
 
Back
Top