disable "proxy store" on "?start=1" param

double nginx-forum at nginx.us
Mon Aug 11 18:13:53 UTC 2014


Hello,

Is there a good way to disable "proxy_store", if the parameter "start=" is
set?
The down below configuration works, but I get an error message:
"[crit] ... open()  "/dev/null.0000000004" failed (13: Permission denied)
while reading upstream ..."
Using "set $proxy_store off;" won't work, because it is handles as a
string.

Thanks a lot!
Marcus


    server {
        listen          80;
        root             /home/nginx;
        location ~ \.mp4$ {
            try_files                   $uri @upstream;
            mp4;
        }
        location @upstream {
            set $proxy_store "/home/nginx$uri";
            if ($arg_start) {
                set $proxy_store "/dev/null";
            }
            proxy_pass                     
http://upstream.com$request_uri;
            proxy_store                     $proxy_store;
        }
    }

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,252487,252487#msg-252487



More information about the nginx mailing list