Check this out, different cookie but same concept!Small issue though, doubt it can be fixed.
For guests they are unable to change styles. I know there's the 'xf_edit_style_id' cookie but whitelisting that would disable cache for all
Would it still disable the cache for that cookie though?Check this out, different cookie but same concept!
http://serverfault.com/questions/704816/nginx-cache-based-on-cookies
Too expensive for that feature if you buy for cache only.For those Cloudflare user on Business plan, you don't need this tutorial anymore .
And just use the built in feature of CF: https://blog.cloudflare.com/caching-anonymous-page-views/
I hope someday I can afford that plan.
Starting nginx: nginx: [emerg] the same path name "/tmp/nginx_fastcgi_cache" used in /usr/local/nginx/conf/conf.d/audiogearclub.com.conf:21 and in /usr/local/nginx/conf/conf.d/foreverfilm.org.conf:22
Starting nginx: nginx: [emerg] duplicate zone "fastcgicache" in /usr/local/nginx/conf/conf.d/foreverfilm.org.conf:22
Yes of course.Before I go any further down this path, is fastcgi_cache better than using [bd] Cache
Instead of doing that, I recommend you follow the guide but use different php.conf file for every domain you have.Thanks for sharing this @RoldanLT
I got an error, Nginx failed to restart when adding code to nginx.conf
I was able to get it working for one site by adding the code outside of server block in domain.conf
However, when I tried to add the same code for other sites / domains, I got:
Code:Starting nginx: nginx: [emerg] the same path name "/tmp/nginx_fastcgi_cache" used in /usr/local/nginx/conf/conf.d/audiogearclub.com.conf:21 and in /usr/local/nginx/conf/conf.d/foreverfilm.org.conf:22
Then I tried specifying /tmp/nginx_fastcgi_cache for one site, /tmp/nginx_fastcgi_cache2 for another site, etc, and got a different error:
Code:Starting nginx: nginx: [emerg] duplicate zone "fastcgicache" in /usr/local/nginx/conf/conf.d/foreverfilm.org.conf:22
Before I go any further down this path, is fastcgi_cache better than using [bd] Cache to cache pages for Guests? It's a lot easier to do that one .
Yes.Not using ngx_pagespeed?
Not sure how :/.Is there a way I can limit ngx_pagespeed to images and have fastcgi_cache cache the rest?
Instead of doing that, I recommend you follow the guide but use different php.conf file for every domain you have.
And specifically create new php.conf (like php_fastcgi_cache.conf) that has fastcgi_cache on it.
I'll use the minimal config guide here: https://xenforo.com/community/threa...-full-page-guest-caching.110806/#post-1025390Can you explain in a little more detail the part about using different php.conf for every domain?
### FastCGI Cache ################
map $http_cookie $nocachecookie {
default 0;
~xf_logged_in 1;
}
fastcgi_cache_path /tmp/nginx_fastcgi_cache levels=1:2 keys_zone=fastcgicache:200m inactive=30m;
fastcgi_cache_key $scheme$request_method$host$request_uri;
fastcgi_cache_lock on;
fastcgi_cache_use_stale error timeout invalid_header updating http_500;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
### FastCGI Cache ################
### fastcgi_cache ###
fastcgi_cache fastcgicache;
fastcgi_cache_bypass $nocachecookie;
fastcgi_no_cache $nocachecookie;
fastcgi_cache_valid 5m;
add_header X-Cache $upstream_cache_status;
### fastcgi_cache end ###
Yeah I think there is.Is there any advantage to setting fastcgi_cache_path to a RAM location with tmpfs?
Does it qualify?why this thread is not a Resource?
We use essential cookies to make this site work, and optional cookies to enhance your experience.