Friday 15 January 2010

caching - Set expires to max for all images of all servers in nginx -


I have nginx setup with more than one server block I would like to know that the end of the world to max .

I know that I can use it:

  place ~ *. (Jpg | jpeg | png | gif | ico | css | js) $ {max exits; }   

But then I must add it to every server block, because location is not allowed in http .

Is there a way to set end to max for a specific mime-type or extension?

Try to try it first because I have not tested it earlier.

conf file / etc / nginx / img-cache .conf for example

  location ~ *. (Jpg | jpeg | png | gif | ico | css | js) $ {maximum end; }   

server

  server {#bla bla include /etc/nginx/img-cache.conf; #bla bla}    

No comments:

Post a Comment