As I understand it, try_files can work only with local files. I need to solve a similar problem, but in our case the files are in S3 and we go there using proxy_pass (all this in a separate location). I really hoped that in some tricky way NGINX would take this very location as a file and I can do everything with the same try_files construct. But it was not there.

Actually the question is - is there a ready solution for this problem?

Thank!

  • google: // mount + s3 + bucket - aleksandr barakin
  • And what prevents to check the answer for a 404 error? - Alexey Ten
  • @AlexeyTen mean using the error_page directive? - andy
  • Yes. And do not forget about proxy_intercept_errors - Alexey Ten
  • @AlexeyTen yes, this option is fine. Thank! - andy

0