Hello,
i saw the tutorial about wordpress.
There is a Addon what is using something equal.
Nginx includes a FastCGI module which has directives for caching dynamic content that are served from the PHP backend. Setting this up removes the need for additional page caching solutions like reverse proxies (think Varnish) or application specific plugins. Content can also be excluded from caching based on the request method, URL, cookies, or any other server variable.
1st: Install required Addon, to have persistent cookie for Login Users.
2nd: Add this code into your Nginx config / nginx.conf, below http { block
`
Start FastCGI Cache
map $http_cookie $nocachecookie {
default 0;
xf_user 1;
xf_style_id 1;
xf_lscxf_logged_in 1;
}
map $request_uri $nocacheuri {
default 0;
~^/register 1;
~^/login 1;
~^/misc/style 1;
}
fastcgi_cache_path /var/run/nginx_fastcgi_cache levels=1:2 keys_zone=fastcgicache:512m inactive=30m;
End FastCGI Cache`
3rd: From this example, add after this code:include fastcgi_params;
`
fastcgi_cache start
fastcgi_cache_methods GET;
fastcgi_cache_key $host$request_method$request_uri;
fastcgi_cache_lock on;
fastcgi_cache_use_stale error timeout invalid_header updating http_500 http_503;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
fastcgi_cache fastcgicache;
fastcgi_no_cache $nocachecookie $nocacheuri;
fastcgi_cache_bypass $nocachecookie $nocacheuri;
fastcgi_cache_valid 200 301 302 303 404 5m;
add_header X-Cache-Status $upstream_cache_status;
fastcgi_cache end
`
Tried serveral things but dont get it working.
Would be nice for help.
Regards