- Plesk for Linux
nginx cannot be started. nginx status and nginx configuration check shows a similar error message to the below:
# nginx -t
nginx: [emerg] "proxy_buffer_size" directive is not allowed here in /etc/nginx/nginx.conf:45
nginx: configuration file /etc/nginx/nginx.conf test failed
Syntax error in nginx configuration files.
Remove customization from the files mentioned in the error message and start nginx. Refer to this KB article to restore the original content of the
To avoid this issue in future, define additional nginx configuration:
globally using the steps from the KB article:
per domain using the Additional nginx directives filed in Plesk:
Go to Domains > example.com > Apache and Nginx Settings and scroll down to the Additional Nginx directives field.
Add desired nginx configuration and apply the changes.
Note: For security reasons, Plesk customers cannot view and edit the Additional nginx directives field.
per service plan using the Additional nginx directives filed in Plesk:
Go to Service Plans > plan_name > Web Server and scroll down to the Additional Nginx directives field.
Add desired nginx configuration and click Update & Sync.