• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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