倒霉狐狸的博客
早睡早起吃早饭 骨头骨头 咔咔
nginx增加静态缓存

loction 是个坑,在nginx中每个location都是独立的,如果不设置root地址就会找不到东西

server {
    listen 80;
    server_name h5.kaikai001.com;
    set $lt_path "/usr/share/nginx/html/site";
    location ~ .*\.(html|js|css|jpg|png|swf|gif)$ {
        root $lt_path;
        expires 10d;
    }
    include fast.server;
}