-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
purge returns 404 #4
Comments
location ~ /purge(/.*) {
# proxy_cache_purge cache_proxy "$scheme$request_method$host$request_uri";
default_type text/plain; # not "application/octet-stream"
return 200 "$scheme$request_method$host$request_uri";
} … {
proxy_cache_path …
proxy_cache_key "$scheme$request_method$host$request_uri";
default_type text/plain; # not "application/octet-stream"
return 200 "$scheme$request_method$host$request_uri";
} |
I have nginx.conf with #nginx.conf
proxy_cache_path /usr/local/nginx/proxy/domain.com levels=1:2 keys_zone=domain.com_cache:15m inactive=4h max_size=1000m use_temp_path=off;
proxy_cache_key $scheme$request_method$host$request_uri;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504 http_403 http_404;
proxy_cache_valid any 1m; #domain.com.conf
location / {
proxy_pass http://apache_reverse;
proxy_cache domain.com_cache;
add_header X-Proxy-Cache $upstream_cache_status;
# 2 rules to dedicate the no caching rule for logged in users.
proxy_cache_bypass $nocache; # Do not cache the response.
proxy_no_cache $nocache; # Do not serve response from cache.
}
location ~ /purge(/.*) {
#proxy_cache_purge arabturkey_cache $scheme$request_method$host$request_uri;
default_type text/plain; # not "application/octet-stream"
return 200 "$scheme$request_method$host$request_uri";
} $ curl -L domain.com/purge/
httpsGETdomain.com/purge/ |
I have the same issue on nginx-1.10.0 location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache tmpcache;
proxy_cache_key $uri$is_args$args;
proxy_cache_valid 200 6M;
proxy_ignore_headers Cache-Control;
proxy_ignore_headers Set-Cookie;
proxy_hide_header Set-Cookie;
add_header X-Cached $upstream_cache_status;
proxy_cache_purge PURGE from 127.0.0.1;
etag on;
} I have cache file with key
But when I make PURGE request on this url nginx returns 404
|
@davydovsky |
@torden |
@davydovsky @mostafahussein |
This may not an issue with the purge module itself, but i am looking for an explanation. My settings are quite simple. Just as the example but with a different
cache key
and I have tried the same example but still getting same result.In vhost.conf
In nginx.conf
When I try to purge the HTTP status is
404
. I always make sure thatX-Proxy-Status: HIT
when requesting something like:curl -I http://example.com/test.php
and trying to purge it withcurl -I http://example.com/purge/test.php -XPURGE
Could example to me what is the wrong with my configuration ?
I am using nginx 10.x with this module and also tried the original one but still same result
The text was updated successfully, but these errors were encountered: