I was wondering if its possible to disable multithread downloads on nginx. Right now users can use download managers to download a file by splitting a file and I was wondering how I can prevent that on my nginx server.
Use the nginx example for the
It's not just download managers with
The settings you are looking for were added in NGINX 1.1.12
proxy_cache_lock on; proxy_cache_lock_timeout 60;
When the first request for each file is made (and being copies to the proxy_temp_path) it is locked, and if a second request comes in, rather than starting a second request to the backend, the client waits proxy_cache_lock_timeout for the original request to finish. If the original request finishes before the timeout, the result from the first request (client A) is returned to client B. If the timeout expires, nginx starts a second request to the backend on behalf of client B
This is a better solution than 'limit_conn one 1' which restricts to a single concurrent request for the entire location, rather than per URI.