Enter custom Apache directives for domain in Plesk for Linux

Create a custom vhost.conf file and populate it with the appropriate content, for example:

<Location />
    deny from all

Depending on your version of Plesk, this file will be created at the following location:

Plesk <= v11.0 : /var/www/vhosts/domainname.com/conf/vhost.conf

Plesk >= v11.5 : /var/www/vhosts/system/domainname.com/conf/vhost.conf


Then instruct Plesk to activate the custom vhost.conf via the following command:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain domainname.com
Was this answer helpful? 0 Users Found This Useful (279 Votes)