server { 
    listen       80; 
    server_name  www.example1.com; 

    location / { 
        root   /var/www/www.example1.com; 
        index  index.php index.html index.htm; 
        if (-f $request_filename) { 
                break; 
        } 
       set $supercache_file ''; 
       set $supercache_uri $request_uri; 
       if ($request_method = POST) { 
                set $supercache_uri ''; 
        } 
       if ($query_string) { 
                set $supercache_uri ''; 
        } 
       if ($http_cookie ~* "comment_author_|Wordpress|wp-postpass_" ) { 
                set $supercache_uri ''; 
        } 
       if ($supercache_uri ~ ^(.+)$) { 
                set $supercache_file /blog/wp-content/cache/supercache/$http_host/$1index.html; 
        } 
      if (-f $document_root$supercache_file) { 
                rewrite ^(.*)$ $supercache_file break; 
        } 
        if (!-e $request_filename) { 
            rewrite ^(.+)$ /index.php?q=$1 last; 
        }

    } 

    location ~ \.php$ { 
        include /etc/nginx/fastcgi_params; 
        fastcgi_pass   127.0.0.1:9000; 
        fastcgi_index  index.php; 
        fastcgi_param  SCRIPT_FILENAME  /var/www/www.example1.com$fastcgi_script_name; 

    } 
} 
