Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_limit_conn_module.xml @ 351:a4fa80755eab
Consistently strip initial offset in examples.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 24 Jan 2012 11:01:22 +0000 |
parents | 4c6d2c614d2c |
children | bb51d3e17dd0 |
comparison
equal
deleted
inserted
replaced
350:55c1c4a1748f | 351:a4fa80755eab |
---|---|
59 When this limit is exceeded, the server will return error | 59 When this limit is exceeded, the server will return error |
60 <http-status code="503" text="Service Temporarily Unavailable"/> | 60 <http-status code="503" text="Service Temporarily Unavailable"/> |
61 in reply to a request. | 61 in reply to a request. |
62 For example, the directives | 62 For example, the directives |
63 <example> | 63 <example> |
64 limit_conn_zone $binary_remote_addr zone=addr:10m; | 64 limit_conn_zone $binary_remote_addr zone=addr:10m; |
65 | 65 |
66 server { | 66 server { |
67 location /download/ { | 67 location /download/ { |
68 limit_conn addr 1; | 68 limit_conn addr 1; |
69 } | 69 } |
70 </example> | 70 </example> |
71 allow for only a single connection at a time, per unique IP address. | 71 allow for only a single connection at a time, per unique IP address. |
72 </para> | 72 </para> |
73 | 73 |
74 <para> | 74 <para> |
76 any configured limit will apply. | 76 any configured limit will apply. |
77 For example, the following configuration will limit the number | 77 For example, the following configuration will limit the number |
78 of connections to the server per client IP and at the same time | 78 of connections to the server per client IP and at the same time |
79 will limit the total number of connections to the virtual host: | 79 will limit the total number of connections to the virtual host: |
80 <example> | 80 <example> |
81 limit_conn_zone $binary_remote_addr zone=perip:10m; | 81 limit_conn_zone $binary_remote_addr zone=perip:10m; |
82 limit_conn_zone $server_name zone=perserver:10m; | 82 limit_conn_zone $server_name zone=perserver:10m; |
83 | 83 |
84 server { | 84 server { |
85 ... | 85 ... |
86 limit_conn perip 10; | 86 limit_conn perip 10; |
87 limit_conn perserver 100; | 87 limit_conn perserver 100; |
88 } | 88 } |
89 </example> | 89 </example> |
90 | 90 |
91 </para> | 91 </para> |
92 | 92 |
93 <para> | 93 <para> |