nginx 配置静态文件过期时间

编辑配置文件:
vim /usr/local/nginx/conf/vhosts/test.conf

加入:
location ~ .*.(gif|jpg|jped|png|bmp|swf)$

    {
            access_log off;
            expires 15d;
    }

location ~ \.(js|css)

    {
            access_log off;
            expires  2h;
    }