webdnstools.com
DNS Lookup, Reverse DNS Lookup, Domain Configuration Check and IP Address Calculators

Modifying Apache Configuration Under Plesk

Do you manage your server with Plesk and want to modify your Apache configuration file? If so, read on...

If you are using Plesk to manage your server, making changes to the Apache configuration files should be done with care. Firstly, each domain managed by Plesk has its own Apache configuration file. These files are called httpd.include and are located in the conf directory under each domain. You should not make changes to the httpd.include file because your changes will get overwritten when you make any changes to the domain in Plesk. Instead, Plesk allows you to create a vhost.conf file which is referenced by the httpd.include file. The first thing you need to do is create your vhost.conf file containing the additional configuration. This file should be located in the same directory as the httpd.include file. If your domain is called example.com, and you're using Linux, it would be in the following directory:

/var/www/vhosts/example.com/conf/

Note that under Plesk, you need to be logged in as the root user to change files in the /conf/ directory.

After you have created your vhost.conf file, you need to reconfigure Plesk to include it. To do this run the following command:

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=example.com

The httpd.include file for your domain will now contain a reference to the vhost.conf file. This command will also load the contents of the vhost.conf file. Any further changes you make to it will require restarting the Apache HTTP server (or you could run the same websrvmng command again).

To restart the Apache HTTP server, run the following command as the root user:

/etc/init.d/httpd restart