0

We are using nginx as load balancer between two webserver

Is it possible to have nginx look if a requested file exists in a specific local directory (some minified css/js files, some images) and if yes, serve the file directly, if no pass the request to the upstream backend?

1
  • Did you have setup caches in nginx configuration?
    – mariaczi
    Apr 23, 2018 at 13:51

1 Answer 1

1

That is exactly what the try_files directive is for.

try_files /local/directory @backends

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .