A
A
alexeysilver2012-12-14 07:00:19
Nginx
alexeysilver, 2012-12-14 07:00:19

Nginx_storage doesn't work. What am I doing wrong?

Good day!
I tried to configure nginx_storage as a permanent cache, files are proxied but not written to storage.

location ~* /get_([0-9]+)/(.*).txt$ {
        root /var/www;
        try_files /nginx-store/$1.txt =404;
        open_file_cache_errors off;
        error_page 404 = /internal_$1/$2.txt;
    }
    location ~ /internal_([0-9]+)/(.*).txt$ {
        internal;
        proxy_pass http://serv2/$1/$2.txt;
        proxy_ignore_headers "Cache-Control" "Expires" "Set-Cookie";
        proxy_store /var/www/nginx-store/$1.txt;
        proxy_store_access   user:rw  group:rw  all:r;
    }

When I physically create a file in /var/www/nginx-store/2222.txt, then by request /get_2222/name.txt I get access to it.
What am I doing wrong? Or maybe I didn’t understand the functionality of nginx_storage from the nginx manuals?
Thanks in advance.

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