Lack of Nginx support from WP Super Cache
-
Very heavily trafficked WordPress blogs are moving away from Apache to Nginx. In fact, WordPress itself uses Nginx in their server mix.
I’ve been waiting for the day when WP Super Cache would have a set of regular expressions for Nginx that match the /.htaccess and wp-content/cache/.htaccess Apache files. Currently the Nginx community uses the barebones regular expressions below for Super Cache:
# if the requested file exists, return it immediately if (-f $request_filename) { break; } set $supercache_file ''; set $supercache_uri $request_uri; 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_|wordpress|wp-postpass_" ) { set $supercache_uri ''; } # if we haven't bypassed the cache, specify our supercache file if ($supercache_uri ~ ^(.+)$) { set $supercache_file /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 . /index.php last; }
Donncha, could you provide translated files for Nginx in your next release? There are a lot of people who would greatly appreciate it.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Lack of Nginx support from WP Super Cache’ is closed to new replies.