How to set expection when using limit_conn?

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:

      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: