Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
nginx byte request on proxied file
server {
listen *:80;
location = /crossdomain.xml {
root /var/www/html/;
}
location = /test.html {
root /var/www/html/;
}
location / {
root /data/www;
error_page 404 = /fetch$uri;
}
location /fetch {
internal;
proxy_pass http://127.0.0.1:50000;
proxy_store on;
proxy_store_access user:rw group:rw all:r;
proxy_temp_path /data/temp;
alias /data/www;
}
location /test {
bytes on;
if ($http_range) {
set $args $http_range;
}
rewrite /test/(.+)$ /$1 break;
proxy_pass http://127.0.0.1:50000;
}
location /m {
#bytes on;
rewrite /m/(.+)$ /$1 break;
proxy_pass http://127.0.0.1:50000;
}
}
# using: ngx_http_bytes_filter_module
location / {
bytes on;
if ($http_range) {
set $args $http_range;
}
proxy_pass http://127.0.0.1:50000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment