# Limit connections to mp4 files

**URL:** <https://www.ruby-forum.com/t/limit-connections-to-mp4-files/226689>\
**Category:** NGINX\
**Created:** [February 18, 2013, 1:02pm UTC](https://www.ruby-forum.com/t/limit-connections-to-mp4-files/226689 "2013-02-18T13:02:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71e660/32.png) [@cris](https://www.ruby-forum.com/u/cris)\
**Post date:** [February 18, 2013, 1:02pm UTC](https://www.ruby-forum.com/t/limit-connections-to-mp4-files/226689/1 "2013-02-18T13:02:19Z")

</div>

Hello

I set this to my nginx config to prevent users playing multiple videos  
at  
the same time:

http {  
limit\_conn\_zone $binary\_remote\_addr zone=addr:10m;  
server {  
location ~ .mp4$ {  
limit\_conn addr 2;  
limit\_conn\_log\_level info;

This doesn’t seems to prevent anyone from playing at least three videos  
at  
once…  
What am I doing wrong here?
