G
G
gremlintv22018-11-01 13:31:27
Nginx
gremlintv2, 2018-11-01 13:31:27

What is the actual way to wildcard (with an asterisk) purge the cache on nginx at the moment via an HTTP request?

I’ll make a reservation right away that I was looking for and found several ways:
1) https://www.ryadel.com/en/nginx-purge-proxy-cache-...
In the first:
a) updating the cache by curl request (BYPASS), works for me, but there is no example for updating the cache by wildcard
b) deleting the cache by curl request with the PURGE method, using the outdated ngx_cache_purge-2.3 module, but there is no example for updating the cache by wildcard, and even though I configured it as shown in the article, it doesn’t work for me ( nginx 1.14):

curl -X PURGE -I mysite.com/text.txt
curl: (52) Empty reply from server

c) deleting the cache by curl request with the PURGE method separated by locations (did not try because I have 1 location that needs to be cleared from the cache), there is no example for updating the cache by wildcard
2) https://scene-si.org/2016 /11/02/purging-cached-ite... ; https://gist.github.com/titpetric/2f142e89eaa0f36b...
In the second one:
If I understand correctly, lua requires nginx version 1.10 from me, but 1.14
nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_lua_module.so" version 1010001 instead of 1014000 in /etc/nginx/nginx.conf:1

Actually the question is: is there a working way to delete the cache for nginx 1.14 version by wildcard ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question