Fixing Plesk 11.5 error 500 NGINX & WordPress path url Slash Redirect Error

HARIANACEH.co.id — You may have noticed that when visiting a WordPress site on a Plesk 11.5 server, the page redirects don’t always work. Depending on whether or not the URL has a trailing slash (/), you may get a 500 Internal Server Error message.

The problem seems to be with the default templates that Plesk uses to create domains. Luckily, we can customize them and fix the issue in the URL rewrite lines.

Create a custom NGINX Default Domain template

First, we need to create the custom paths and copy the original template files.

mkdir /usr/local/psa/admin/conf/templates/custom/domain
cd /usr/local/psa/admin/conf/templates/custom/domain
cp /usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php

Edit our NGINX Default Domain VirtualHost PHP template

Now we edit the NGINX Default Domain VirtualHost PHP template and make some minor changes to the URL rewrite

nano nginxDomainVirtualHost.php