Can't get fastcgi_cache to work

Can someone please have a look at my config files? I ended with this set of configs after installing ISPCFG3 and having several problems I posted here in the forums, I then applied the replies to the master templates of ISPCFG so it gets applied to all new vhosts.

Attachment Link(s):

http://rtcamp.com/wp-content/uploads/rtMedia/topics/4853/2013/01/100-pacura.ru_1.pdf

http://rtcamp.com/wp-content/uploads/rtMedia/topics/4853/2013/01/nginx1.pdf

sorry, need to add more info: there never seems to be anything in the cache folder:

ls -al /var/run/nginx-cache/

I tried from different browsers, emptied the cache, etc. Default ISPCFG3 install, ported one WP site over, no caching plugins, Cloudflare deactivated.

Any help here please? I'd really love to integrate this caching into my system.

Sorry to bump but could someone please have a look at this thread? Any ideas? I'll attach the current config files: nginx.conf the vhost file and the custom ISPCONFIG3 template that generates the vhost file.

Attachment Link(s):

http://rtcamp.com/wp-content/uploads/rtMedia/topics/24580/2013/01/100-pacura.ru_.vhost_1.pdf

http://rtcamp.com/wp-content/uploads/rtMedia/topics/24580/2013/01/nginx.conf_1.pdf

http://rtcamp.com/wp-content/uploads/rtMedia/topics/24580/2013/01/nginx_vhost.conf_.master1.pdf

oh, forgot to add the nginx directives added only to this one vhost via the ISPCFG3 options:

> location / { try_files $uri $uri/ /index.php?q=$uri&$args; } location ~ /purge(/.) { fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; } location ~ ^.+.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { access_log off; log_not_found off; expires 7d; }

So does your problem fixed?

I am sorry but I did not get time to dig deeper into ISPCONFIG 3 and I don't think I will be able to explore it before Feb-end!

sorry to hear that, btw. I have replied in this thread: https://rtcamp.com/support/topic/apc-web-interface-problem/ - all these two problems need to be solved together anyway since they both deal with nginx.

In nginx.conf_1.pdffile, try adding following line:

fastcgi_ignore_headers Cache-Control Expires Set-Cookie;  

After line:

fastcgi_cache_use_stale error timeout invalid_header http_500;  

Do not forget to reload nginx config. Let me know if this works?

(Context: https://rtcamp.com/tutorials/nginx-wordpress-fastcgi_cache-with-conditional-purging/#comment-16943)

Sorry for the late reply, I got help up with other problems. BUT the line above fixed my problems, the cache now works except that the "Faux Purge all URLs" button doesn't do anything.

Is it supposed to clean the cache immediately? I waited a few seconds, checked, waited again, checked again, the cache is not being emptied. Any ideas?

And another question related to your Nginx Helper plugin: currently it prints the generation time as a comment into the source code, could you also show the time it took to serve the static content to the visitor so oen can see the advantage of the cache? something along the lines: "It took 37 queries executed in 0.649 seconds and 0.1 seconds to serve you this cached page." ?

I found the explanation on the plugin's page as to how the purge works with the /purge/ in the URL.

You can ignore "Faux Purge all URLs" for a while.

A real "Purge all" button will be coming soon to nginx-helper.

Sometimes you miss simpler way to deal with problems!

Ref: https://github.com/rtCamp/nginx-helper/issues/10#issuecomment-13306319