• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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