How to configure nginx response cachig for some location using templates?

gelembjuk

New member
Joined
Mar 14, 2020
Messages
3
I have the server with DirectAdmin . There is Nginx+Apache.
I have PHP scripts and some requests are to get image file. PHP does some actions on image and than saves it to disk and next time just return same saved image.
I would like to optimize this process . I want Nginx somehow also cache that images and on next request just return it itself, without forwarding the request to apache and apache to php.

How can i do it? I want to add config to specified domain name with DirectAdmin , Custom HTTPD Configurations, Domain name (nginx). There are some templates CUSTOM1, CUSTOM2 etc.

How can i do it? Where and what to add to make nginx to cache and return images?

My images urls look like (something)/profile/photo/(id)/
(something) can be nothing or some extra path like /de/
 
Back
Top