How can I avoid users from downloading a big file?

I think, that You can configure nginx to check specific location (60gb file location) for specific (Range) header existence. Then You could block requests that don't contain Range header.

You could check these links:


It seems a bit problematic coding complex conditions in Nginx configuration. Maybe You should consider serving large file using some server-side scripting, ie. PHP. There are plenty of examples of streaming scripts.

After configuring Nginx to using such a script, You need to add logic to script (Range conditions) and also prevent direct access to large file.