不允许清除Nginx Plus获取405

不允许清除Nginx Plus获取405,nginx,Nginx,评估Nginx Plus时,当我尝试清除时,我得到一个405不允许。我已经按照指示做了,但不确定遗漏了什么。下面是我的设置 docker run --rm -p 8001:80 --link node-app-local:app --name nginx-proxy-local foo/nginx-nginxplus curl -X PURGE -D – "http://tktestapp:8001/*" nginx.conf user nginx; worker_p

评估Nginx Plus时,当我尝试清除时,我得到一个405不允许。我已经按照指示做了,但不确定遗漏了什么。下面是我的设置

docker run --rm  -p 8001:80 --link node-app-local:app --name nginx-proxy-local foo/nginx-nginxplus

curl -X PURGE -D – "http://tktestapp:8001/*"
nginx.conf

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" $upstream_cache_status';

    log_format nginx '$remote_addr - $remote_user [$time_local] '
                  '"$request" $status $body_bytes_sent $request_time '
                  '"$http_referer" "$http_user_agent"';

    access_log  /var/log/nginx/access.log  nginx;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    gzip  on;

    map $request_method $purge_method {
        PURGE 1;
        default 0;
    }
    
    
    include /etc/nginx/conf.d/*.conf;
}
proxy_cache_path /data/nginx/cache keys_zone=nodejs_app:10m;
proxy_cache nodejs_app;
proxy_cache_valid 200 10m;
proxy_cache_purge $purge_method;
server {
    server_name tktestapp;
    status_zone tktestzone;
    location /test {

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forward-Proto $scheme;
        proxy_pass http://app:3000;
        add_header X-GG-Cache-Status $upstream_cache_status;
    }
}
conf.d/caching.conf

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" $upstream_cache_status';

    log_format nginx '$remote_addr - $remote_user [$time_local] '
                  '"$request" $status $body_bytes_sent $request_time '
                  '"$http_referer" "$http_user_agent"';

    access_log  /var/log/nginx/access.log  nginx;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    gzip  on;

    map $request_method $purge_method {
        PURGE 1;
        default 0;
    }
    
    
    include /etc/nginx/conf.d/*.conf;
}
proxy_cache_path /data/nginx/cache keys_zone=nodejs_app:10m;
proxy_cache nodejs_app;
proxy_cache_valid 200 10m;
proxy_cache_purge $purge_method;
server {
    server_name tktestapp;
    status_zone tktestzone;
    location /test {

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forward-Proto $scheme;
        proxy_pass http://app:3000;
        add_header X-GG-Cache-Status $upstream_cache_status;
    }
}
conf.d/nodejsapp.conf

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" $upstream_cache_status';

    log_format nginx '$remote_addr - $remote_user [$time_local] '
                  '"$request" $status $body_bytes_sent $request_time '
                  '"$http_referer" "$http_user_agent"';

    access_log  /var/log/nginx/access.log  nginx;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    gzip  on;

    map $request_method $purge_method {
        PURGE 1;
        default 0;
    }
    
    
    include /etc/nginx/conf.d/*.conf;
}
proxy_cache_path /data/nginx/cache keys_zone=nodejs_app:10m;
proxy_cache nodejs_app;
proxy_cache_valid 200 10m;
proxy_cache_purge $purge_method;
server {
    server_name tktestapp;
    status_zone tktestzone;
    location /test {

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forward-Proto $scheme;
        proxy_pass http://app:3000;
        add_header X-GG-Cache-Status $upstream_cache_status;
    }
}