-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Here is my setup:
at http level:
fastcgi_cache_path /tmp/nginx-cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;
at server level:
location ~* /purge(/.*) {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
}
No matter what purge does not work.
I enabled debug logs on nginx and here is what i see:
2020/07/30 10:18:05 [debug] 44967#44967: *7 http script var: "http"
2020/07/30 10:18:05 [debug] 44967#44967: *7 http script var: "GET"
2020/07/30 10:18:05 [debug] 44967#44967: *7 http script var: "localhost"
2020/07/30 10:18:05 [debug] 44967#44967: *7 http script capture: "/"
2020/07/30 10:18:05 [debug] 44967#44967: *7 http cache key: "httpGETlocalhost/"
2020/07/30 10:18:05 [debug] 44967#44967: *7 add cleanup: 000055DEB1BAA658
2020/07/30 10:18:05 [debug] 44967#44967: *7 http file cache exists: 0 e:1
2020/07/30 10:18:05 [debug] 44967#44967: *7 cache file: "/tmp/nginx-cache/8/60/e59c4686e1048ac50e848367eccc6608"
2020/07/30 10:18:05 [debug] 44967#44967: *7 add cleanup: 000055DEB1BAA6A8
2020/07/30 10:18:05 [debug] 44967#44967: *7 http file cache fd: 12
2020/07/30 10:18:05 [debug] 44967#44967: *7 thread read: 12, 000055DEB1BAA728, 515, 0
2020/07/30 10:18:05 [debug] 44967#44967: *7 http file cache purge: -1, "/tmp/nginx-cache/8/60/e59c4686e1048ac50e848367eccc6608"
2020/07/30 10:18:05 [debug] 44967#44967: *7 http finalize request: 500, "/purge/?" a:1, c:2
2020/07/30 10:18:05 [debug] 44967#44967: *7 http special response: 500, "/purge/?"
2020/07/30 10:18:05 [debug] 44967#44967: *7 http set discard body
2020/07/30 10:18:05 [debug] 44967#44967: *7 posix_memalign: 000055DEB1BA02B0:4096 @16
2020/07/30 10:18:05 [debug] 44967#44967: *7 HTTP/1.1 500 Internal Server Error
Server: nginx
Date: Thu, 30 Jul 2020 10:18:05 GMT
Content-Type: text/html
Content-Length: 572
Connection: close
X-Xss-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff