SERVER/Nginx2014.02.24 16:32

location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {

    expires 365d;

}


location ~* \.(?:ico|css|js|gif|jpeg|png)$ {

    expires max;

    add_header Pragma public;

    add_header Cache-Control "public, must-reval!idate, proxy-reval!idate";

}


location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {

    expires 365d;

}


location ~* \favicon.ico${

    access_log off;

    expires 1d;

    add_header Cache-Control public;

}


location ~*^.+.(jpg|swf|jpeg|gif|css|png|js|ico)$ {

    access_log off;

    expires 30d;

    add_header Cache-Control public;

}


// Nginx Cache Disable 엔진엑스 서버단에서 캐쉬끄기

http://serverfault.com/questions/269420/disable-caching-when-serving-static-files-with-nginx-for-development

server {

  server_name  static.server.local;

  root /var/www/static;


  ## Default location

  location / {

    access_log        off;

    expires           0;

    add_header        Cache-Control private;

  } 

}

Posted by 시니^^
TAG ,

티스토리 툴바