Bookmark and Share

17

Apr

2010

If you’re using Plesk on a server, it automatically creates and manages your Apache configuration for you. If you are after more complicated Apache configuration options than Plesk already offers, then you will need to add them yourself. You will find if you modify the automatically generated CONF file, that Plesk will just change it straight back again.

The Plesk way to do this is to create a vhost.conf file in the conf directory for that domain (Normally something like: /var/www/vhosts/example.com/conf). Put all of the rules you want to add into this vhost.conf file — and everything within this file is automatically included in the httpd.include without breaking the reconfiguration that Plesk does.

After adding/editing vhost.conf, you need to run the command-line web reconfiguration utility from the command line.

Shell/SSH:

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

This will regenerate the Plesk configuration for Apache, reconfigure the httpd.include, merge in the changes from vhost.conf, and restart Apache with the new configuration.

Job done.

Comments (0)

No comments yet! Why not write the first?

Post a comment

Post comments to this article by filling in your details below.