Answer the question
In order to leave comments, you need to log in
Why is Nginx limit_rate not working?
On a server with Centos7 and nginx/1.16.1 I tried to enable video rate limiting via limit_rate. Searching the Internet, I saw that this method is used as a simple restriction option, which suits me perfectly.
I even took a ready-made use case. But it didn't work for me, I don't understand why. Checking the nginx -t configuration gives no errors, but the restriction does not work.
I added this to the main nginx config:
limit_conn_zone $binary_remote_addr zone=addr:10m;
This is in the domain specific config:
location ~* /videos/ {
limit_conn addr 10;
limit_rate_after 500k;
limit_rate 150k;
proxy_buffering on;
}
I looked at the nginx documentation, it seems that I wrote everything correctly in the config. Then why doesn't it work?
I don't want to install nginx_limit_speed_module. It's quite old and I'm not sure if it's compatible with the new nginx. Yes, and it may also not work even if the standard nginx directive does not work.
Maybe you've come across this before? What could be the problem?
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