DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

John has posted 18 posts at DZone. View Full User Profile

Nginx Expires Config

04.18.2008
| 8534 views |
  • submit to reddit
        
  location ~* ^.+\.(js|css|php|jpg|jpeg|gif|png|pdf|zip|rar)$ {
    root   /var/www/apps/myapp/public;
    access_log   off;
    expires      7d;
  }
    

Comments

John Griffiths replied on Mon, 2007/07/23 - 7:25am

if you're using Typo as your blogging platform, remove js|css as it'll screw up your site's theme. know this from personal experience.