Symptoms
Cannot simultaneously disable Proxy Mode and add nginx directive containing location /
in Domains > example.com > Apache & nginx Settings:
PLESK_ERROR: Invalid nginx configuration: nginx: [emerg] duplicate location “/” in /var/www/vhosts/system/example.com/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed
Cause
This is a Plesk bug with ID PPPM-9841 which is planned to be fixed in future product updates.
Resolution
As a workaround until fix available:
-
Go to Domains > example.com > Apache & nginx directives
-
Temporary remove additional nginx directive containing
location /
click Apply to save the change -
Disable Proxy Mode and click Apply
-
Insert the necessary directive back into Additional nginx directives and click OK to apply the changes