Nginx limit_rate based on file extension

charles13 nginx-forum at
Fri Jun 24 07:10:08 UTC 2016


I wonder is there any way to limit_rate based on file extension in Nginx,
for example, putting different rate limit rules on flv and mp4?

I've tried this, but somehow returned file not found

location ~* \.(flv|f4v)$ {
limit_rate_after 1m;
limit_rate 80k;

location ~* \.(mp4|m4v)$ {
limit_rate_after 3m;
limit_rate 80k;

Your help is really appreciate!

Posted at Nginx Forum:,267852,267852#msg-267852

More information about the nginx mailing list