Skip to content

Instantly share code, notes, and snippets.

/stream.conf Secret
Created May 20, 2017

Embed
What would you like to do?
rewrite ^/test.one.mp3$ /test.two.mp3?$date_gmt redirect;
rewrite ^/test.two.mp3$ /test.three.mp3?$date_gmt redirect;
rewrite ^/test.three.mp3$ /test.mp3?$date_gmt redirect;
location ~ ^/internal_redirect_on/(?P<diskNumber>[\d\w]+)/(?P<dir1>[\w\d])/(?P<dir2>[\w\d])/(?P<dir3>[\w\d])/(?P<dir4>[\w\d])/(?P<dir5>[\w\d])/(?P<dir6>[\w])/(?P<filename>[\w\d\_\.]+)/(?P<download_host>[a-zA-Z\d\-\.]*?)/(?P<fullurl>.*)$ {
internal;
expires max;
set $download_url http://$download_host/$fullurl$is_args$args;
resolver 8.8.8.8;
proxy_set_header Host $download_host;
proxy_set_header Authorization '';
proxy_pass $download_url;
proxy_store C:/nginx/html/cache/$diskNumber/$dir1/$dir2/$dir3/$dir4/$dir5/$dir6/$filename;
proxy_temp_path C:/nginx/html/cache/nginx 2 2;
proxy_store_access user:rw group:rw all:r;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.