Page 1 of 1

Flush nGinX Cache

Posted: Mon Feb 09, 2015 11:07 am
by mehargags
On Debian7,
I have apache-> default nGinx -> hosting which sets nGinx as Revese proxy ---- right ?

I'm facing a problem in server where when visit the site domain.com -- served from nGinx, I see some chinese chars which are not rendering problem. I asjusted my htacess, and then checked domain.com:8080 to load it from apache, it was fixed, however nGinx is still serving the "non-working" cached copy of the page.

How can I FLUSH and PURGE nginx reverse proxy cache and force it load a fresh copy?

on Debian7

Re: Flush nGinX Cache

Posted: Mon Feb 09, 2015 9:44 pm
by skurudo
Nginx on default templates do not have cache at all. You can see and compare yourself:
/usr/local/vesta/data/templates/web/nginx/default.tpl and /usr/local/vesta/data/templates/web/nginx/caching.tpl

But if you think about cache problem, then you need check directories from config below - /var/cache/nginx and /var/cache/nginx/temp

Code: Select all

    
    proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
    proxy_cache_key "$host$request_uri $cookie_user";
    proxy_temp_path  /var/cache/nginx/temp;
    proxy_ignore_headers Expires Cache-Control;
    proxy_cache_use_stale error timeout invalid_header http_502;
    proxy_cache_valid any 3d;