XenForo Forum with Nginx fastcgi_cache full page guest caching

Status
Not open for further replies.
Then on php.conf, change to this code.
Code:
### fastcgi_cache ###
fastcgi_cache           fastcgicache;
fastcgi_cache_bypass    $nocachecookie $nocacheuri;
fastcgi_no_cache        $nocachecookie $nocacheuri;
fastcgi_cache_valid     200 202 302 404 403 5m;
fastcgi_cache_valid     301 1h;
fastcgi_cache_valid     any 1m;
add_header X-Cache      $upstream_cache_status;
### fastcgi_cache end ###

Basically please follow my full guide. https://xenforo.com/community/threa...fastcgi_cache-full-page-guest-caching.110806/

That seemed to fix everything.
 
  • Like
Reactions: rdn
It's optional but adds more prevention for the issue you encounter.
And please change your nginx code to this:
Code:
### FastCGI Cache ################
map $http_cookie $nocachecookie {
     default                   0;
    ~xf_fbUid                  1;
    ~xf_user                   1;
    ~xf_logged_in              1;
}
   
map $request_uri $nocacheuri {
       default              0;
    ~^/register             1;
    ~^/login                1;
    ~^/validate-field       1;
    ~^/captcha              1;
    ~^/lost-password        1;
    ~^/two-step             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 ################

Actually, this was the part that seemed to fix everything. I will look to your resource for the latest version.
 
Status
Not open for further replies.
Top Bottom