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?

dwing265
  • 3
  • 2

1 Answers1

1

That is exactly what the try_files directive is for.

try_files /local/directory @backends
Gerard H. Pille
  • 2,569
  • 1
  • 13
  • 11