Custom configuration for Plesk domains

If you ever change your web server configuration files under Plesk manually, your changes will be overwritten the next time you use the administration console and apply any settings through it. This can be solved by adding a configuration file to your domain config folder

/var/www/vhosts/<yourdomain.com>/conf/vhost.conf

or subdomain config folder

/var/www/vhosts/<yourdomain.com>/subdomains/<subdomain>/conf/vhost.conf

depending on which element you need to apply custom configuration to.

In order to make these files effective, you need to run a Plesk command that will detect the presence of the new files and include them in your domain’s main config file (they are not by default). You can do this at the specific domain level

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<yourdomain.com>

or just reload all domain configurations at once

/usr/local/psa/admin/bin/websrvmng -a

You can now safely keep on using the Plesk administration console and be sure that your custom configurations will not be overwritten or affected in any way. This information definitely applies to Plesk 8.2 where it has been tested, but should work equally well on previous and possibly later versions.

Leave a comment

Your email address will not be published. Required fields are marked *


*