So, there is a configuration file, here is the part of the config:

location = / { root www/html; try_files $uri $uri/ $uri.html; } location ~* \.(jpg|jpeg|png)$ { root www/resources/img; expires 1y; add_header Cache-Control public; } location ~* \.(css)$ { root www/resources/css; expires 1y; add_header Cache-Control public; } location ~* \.(js)$ { root www/resources/js; expires 1y; add_header Cache-Control public; } 

If you make a request: localhost/1.jpg , then the file will be found in the second location (www/resources/img) , but if you put another one into this folder with another picture, then the search will not occur in it. How to make it so that if a file is not found in the www/resources/img directory, then nginx independently went through the internal folders and looked for the file there?

0