Fixing Plesk error 500 NGINX & Joomla path url slash redirect

More
9 years 2 days ago - 9 years 2 days ago #636 by 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:
/usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php .

Edit our NGINX Default Domain VirtualHost PHP template


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

With this:
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

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


Restart Apache, NGINX and PHP-FPM
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
Last edit: 9 years 2 days ago by Support Team.

Please Log in to join the conversation.

Time to create page: 0.213 seconds
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

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries