# How to set expection when using limit\_conn?

**URL:** <https://www.ruby-forum.com/t/how-to-set-expection-when-using-limit-conn/201426>\
**Category:** NGINX\
**Created:** [January 7, 2011, 1:42am UTC](https://www.ruby-forum.com/t/how-to-set-expection-when-using-limit-conn/201426 "2011-01-07T01:42:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 7, 2011, 1:42am UTC](https://www.ruby-forum.com/t/how-to-set-expection-when-using-limit-conn/201426/1 "2011-01-07T01:42:05Z")

</div>

i want to use limit\_conn to let all remote address user maximum 1  
connection. I also want to let list of private port have unlimit  
connection. how do i do that?

here is my sample conf:

```auto
      limit_zone remote_addr $binary_remote_addr 10m;

     location / {
       listen 80;
       server_name download.example.com;

       root /var/www/html1/;

    # limit connection
    limit_conn remote_addr 2;
    limit_rate 10k;
     }
```

Posted at Nginx Forum:

> **[how to set expection when using limit\_conn?](https://forum.nginx.org/read.php?2,164243,164243#msg-164243)**
>
> i want to use limit\_conn to let all remote address user maximum 1 connection. I also want to let list of private port have unlimit connection. how do i do that? here is my sample conf: \[code\] limit\_zone remote\_addr $binary\_remote\_addr 10m; l
