Fixing Plesk error 500 NGINX & Joomla path url slash redirect

Mehr
9 Jahre 7 Monate her - 9 Jahre 7 Monate her #636 von Support Team
You may have noticed that when visiting a Joomla site on a Plesk 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.

Or Plesk with NGINX and PHP-FPM not rewrite Joomla Page URLs and is appending index.html at the end of each URL, causing a 404 error.

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.

Make a separated joomla.conf like here does not work.

Create a custom NGINX Default Domain template
First, we need to create the custom paths and copy the original template files.

Find with a ftp client the following file:
Code:
/usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php .

Edit our NGINX Default Domain VirtualHost PHP template


Find / Replace this block of code:
Code:
location ~ /$ { < ?php echo $VAR->domain->physicalHosting->proxySettings[\\\\\\\'directoryIndex\\\\\\\'] ?> }

With this:
Code:
location ~ / { index index.php index.cgi index.pl index.html index.xhtml index.htm index.shtml; try_files $uri $uri/ /index.php?$args; }

As you can see we changed the index.php and the index.html


Rebuild your domain configurations

Now we tell Plesk to rebuild the NGINX conf files for the domains on the server

Code:
/usr/local/psa/admin/bin/httpdmng --reconfigure-all


Restart Apache, NGINX and PHP-FPM
Code:
service php-fpm restart service nginx restart service httpd restart

Enjoy! running MarvikShop with Joomla smooth on a NGINX with PHP-FPM.

No need to edit Additional nginx directives in Plesk. This usually not working for Joomla in SEFmode
Letzte Änderung: 9 Jahre 7 Monate her von Support Team.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Events Joomla
MarvikShop
Finnaly it's here:
 
No bridges, no look a likes!
This is the ultimate integration
between Oscommerce and Joomla!
Documentation
Site Showcase
Follow us