• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

Question How to set Nginx try_files directive on a domain?

Martin Allen

New Pleskian
We have an issue with a Joomla website that is being hosted on CentOS Linux 7.3.1611 with Plesk Onyx Version 17.5.3 - the site is displaying issues when using nginx as a proxy - when we try tro access the domain https://example.com/administrator we are receiving a nginx 502 Bad Gateway error.
If we access https://example.com/administrator/ (with the trailing slash) then it all works as expected, and I now believe the issue is the rewriting of URI.

When running with just Apache, obviously the .htacess rules are set to rewrite the URI correctly. However as nginx is handling it now I believe I need to add a try_files directive to get this to work correctly. However I cannot see where to add this. I have read multiple posts all of which seem to suggest conflicting ways of setting this but always seem to be followed by people saaying not to add the directive in the fashion that is suggested, or that it doesn't work!!

So how (and what) should I be adding to sort this problem??
 
Back
Top