S
S
Stanislav2015-10-17 15:48:12
Nginx
Stanislav, 2015-10-17 15:48:12

How to make a regular expression exception in nginx?

Guys help!

location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|svg)$ {
                        root /var/www/site/static/;
                        expires 3d;
                        add_header Pragma public;
                        add_header Cache-Control "public";
                }

expires caches all files in the /var/www/site/static/ folder
How to disable caching of files in the /var/www/site/static/user-content/uploads/ folder

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Romanenko, 2015-10-17
@slimus

stackoverflow.com/questions/17639188/set-nginx-exp...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question