How to remove nginx cache CENTOS 7

In order to reduce TTFB and to have a more fast website you can activate nginx cache. But after you make an update in css file or javascript you will have to remove nginx cache.

To do that open up your Putty and login to the server as root and write the following code in the terminal.

Remove nginx cache CENTOS 7

rm -rf /etc/nginx-cache/*

The above code will work only if you set the cache nginx folder to be nginx-cache. If you have other folder set as cache for nginx you will have to find it first. 

Type in terminal:

cd /etc/nginx - this will open nginx folder then:
nano nginx.conf

In nginx.conf you should find all settings for nginx. Let me know if you need any help.

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x