server {
  scgi_cache_path   /usr/local/nginx/temp  levels=1:2
                       keys_zone=NAME:10m
                       inactive=5m;
  server_name www.example1.com;
 root     /data/www/www.example1.com;
    location / {
      scgi_pass    127.0.0.1:9000;
      scgi_cache   NAME;
      scgi_cache_valid   200 302  1h;
      scgi_cache_valid   301      1d;
      scgi_cache_valid   any      1m;
      scgi_cache_min_uses  1;
      scgi_cache_use_stale error  timeout invalid_header http_500;
    }
 }