Flush nGinX Cache
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Flush nGinX Cache
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
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
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
/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;