#
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_storeproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_redirect off;
location ~ \.mp4$ {
mp4;
root /data/www;
error_page 404 = @
fetch;
}
location @
fetch {
internal;
proxy_pass
http://backend;
proxy_store on;
proxy_store_access user:rw group:rw all:r;
proxy_temp_path /data/temp;
root /data/www;
}