For example, I have the URL /images/articles/200x200/1.jpg I want nginx to give this picture and all the pictures from the images folder with statics, and if there is no file on the server, I would process the same URL via php

I think here is something like that, but you need to finish it probably:

location /images { location ~ ^/images/uploads/ { error_page 404 .... $uri @fallback; } } 
  • for example, location /images {try_files $uri /через.php;} - aleksandr barakin
  • Then all the files will be forwarded through php - maximus007
  • and you check by specifying a non-existent / /через.php - aleksandr barakin
  • I did not understand what you wanted to express the nested location ? - Alexey Ten

0