Welcome! Log In Create A New Profile

Advanced

Re: HEAD request breaks fastxgi_cache

February 18, 2011 07:09AM
kaspars Wrote:
-------------------------------------------------------
> Btw, what kind of cache invalidation are you
> using, if any? Is it only time based or do you use
> nginx no_cache and cache_bypass directives
> (http://wiki.nginx.org/HttpFcgiModule#fastcgi_no_c
> ache) as well?

It is a WordPress configuration, which relies on the nginx-proxy-cache-purge plugin to purge pages on update.
[code]
/etc/nginx/my.conf# cat wordpress-fastcgi-cache.conf
# Segment to include in all WP installs.
# Configures php-fpm (socket) with fastcgi caching.
set $nocache "";
if ($http_cookie ~ (comment_author_.*|wordpress_logged_in.*|wp-postpass_.*)) {
set $nocache "Y";
}

fastcgi_pass unix:/usr/local/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param CONTENT-LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include fastcgi_params;

fastcgi_cache_use_stale error timeout invalid_header http_500;
fastcgi_cache_key $request_method$host$request_uri;
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 10m;
fastcgi_ignore_headers Expires Cache-Control;
fastcgi_cache_bypass $nocache;
fastcgi_no_cache $nocache;
[/code]

[code]
/etc/nginx/my.conf# nginx -V
nginx version: nginx/0.8.53
built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module=/usr/src/nginx/cache_purge
[/code]

http://wordpress.org/extend/plugins/nginx-proxy-cache-purge/
Subject Author Posted

HEAD request breaks fastxgi_cache

graq February 18, 2011 12:10AM

Re: HEAD request breaks fastxgi_cache

kaspars February 18, 2011 02:56AM

Re: HEAD request breaks fastxgi_cache

graq February 18, 2011 04:21AM

Re: HEAD request breaks fastxgi_cache

kaspars February 18, 2011 04:46AM

Re: HEAD request breaks fastxgi_cache

graq February 18, 2011 07:09AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready