Answer the question
In order to leave comments, you need to log in
How to multi-thread send a remote file through nginx?
Part of nginx config:
#my download internal redirect
location ~* ^/internal_redirect/ {
internal;
access_log /var/log/internal_redirect.access.log;
error_log /var/log/internal_redirect.error.log;
resolver 8.8.8.8;
proxy_buffering off;
proxy_set_header Content-Length "";
proxy_set_header Cookie "";
proxy_hide_header x-amz-request-id;
proxy_hide_header x-amz-meta-uid;
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-meta-mode;
proxy_hide_header x-amz-meta-mtime;
proxy_hide_header x-amz-meta-gid;
proxy_hide_header x-amz-version-id;
proxy_hide_header accept-ranges;
proxy_method GET;
proxy_pass_request_body off;
proxy_max_temp_file_size 0;
set $download_url http://$arg_url;
proxy_pass $download_url;
}
header("X-Accel-Redirect: /internal_redirect/?url=site.ru/path_to_file.mp3");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question