Plesk

How to add custom Apache/nginx configuration for a domain in Plesk

Question

How to add custom Apache/nginx configuration for a domain in Plesk?

Answer

To add domain-specific settings for Apache and Nginx web servers:

  1. Log in to Plesk.

  2. Go to Subscriptions > example.com > Websites & Domains > Hosting & DNS > Apache & nginx Settings.

  3. Add required directives:

    • for Apache configuration - use Additional directives for HTTP/Additional directives for HTTPS fields

    • for nginx configuration - use Additional nginx directives field

Note: After adding configuration and clicking the OK or Apply, Apache and nginx services will be automatically reloaded by Plesk and configuration will take effect. Configuration will be stored in domain's configuration files located in /var/www/vhosts/system/example.com/conf:
Apache - httpd.conf
nginx - vhost_nginx.conf