if ($request_method = POST) { set$supercache_uri''; }
# Using pretty permalinks, so bypass the cache for any query string if ($query_string) { set$supercache_uri''; }
if ($http_cookie ~* "comment_author_wordpresswp-postpass_" ) { set$supercache_uri''; }
# if we haven't bypassed the cache, specify our supercache file if ($supercache_uri ~ ^(.+)$) { set$supercache_file /var/www/wp-content/cache/supercache/$http_host/$1index.html; }
# only rewrite to the supercache file if it actually exists if (-f $document_root$supercache_file) { rewrite ^(.*)$ $supercache_file break; }
# all other requests go to WordPress if (!-e $request_filename) { rewrite . /var/www/index.php last; }
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name; include /etc/nginx/fastcgi_params; **include /etc/nginx/wordpress_params_regular; include /etc/nginx/wordpress_params_supercache;** }