comparison xml/en/docs/http/ngx_http_limit_conn_module.xml @ 271:4c6d2c614d2c

Cleaned up XML tag mess: - all of <parameter> and <code>, and some of <dirname>, <value>, and <command> were replaced by <literal>; - the rest of <dirname> were replaced by links; - <argument> were replaced by <value>; - <value> is now rendered in HTML in italic; - <literal> and <path> can now contain <value>. Cleaned up terminology mess: - directives take "parameters".
author Ruslan Ermilov <ru@nginx.com>
date Fri, 23 Dec 2011 17:29:59 +0000
parents 945d7299c26c
children a4fa80755eab
comparison
equal deleted inserted replaced
270:945d7299c26c 271:4c6d2c614d2c
7 lang="en"> 7 lang="en">
8 8
9 <section id="summary"> 9 <section id="summary">
10 10
11 <para> 11 <para>
12 The <code>ngx_http_limit_conn_module</code> module allows 12 The <literal>ngx_http_limit_conn_module</literal> module allows
13 to limit the number of connections per defined key, in 13 to limit the number of connections per defined key, in
14 particular, the number of connections from a single IP address. 14 particular, the number of connections from a single IP address.
15 </para> 15 </para>
16 16
17 <para> 17 <para>
46 46
47 47
48 <section id="directives" name="Directives"> 48 <section id="directives" name="Directives">
49 49
50 <directive name="limit_conn"> 50 <directive name="limit_conn">
51 <syntax><argument>zone</argument> <argument>number</argument></syntax> 51 <syntax><value>zone</value> <value>number</value></syntax>
52 <default/> 52 <default/>
53 <context>http</context> 53 <context>http</context>
54 <context>server</context> 54 <context>server</context>
55 <context>location</context> 55 <context>location</context>
56 56
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>
75 When several <code>limit_conn</code> directives are specified, 75 When several <literal>limit_conn</literal> directives are specified,
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>
91 </para> 91 </para>
92 92
93 <para> 93 <para>
94 These directives are inherited from the previous level if and 94 These directives are inherited from the previous level if and
95 only if there are no 95 only if there are no
96 <code>limit_conn</code> 96 <literal>limit_conn</literal>
97 directives on the current level. 97 directives on the current level.
98 </para> 98 </para>
99 99
100 </directive> 100 </directive>
101 101
102 102
103 <directive name="limit_conn_log_level"> 103 <directive name="limit_conn_log_level">
104 <syntax> 104 <syntax>
105 <value>info</value> | 105 <literal>info</literal> |
106 <value>notice</value> | 106 <literal>notice</literal> |
107 <value>warn</value> | 107 <literal>warn</literal> |
108 <value>error</value></syntax> 108 <literal>error</literal></syntax>
109 <default>error</default> 109 <default>error</default>
110 <context>http</context> 110 <context>http</context>
111 <context>server</context> 111 <context>server</context>
112 <context>location</context> 112 <context>location</context>
113 <appeared-in>0.8.18</appeared-in> 113 <appeared-in>0.8.18</appeared-in>
120 </directive> 120 </directive>
121 121
122 122
123 <directive name="limit_conn_zone"> 123 <directive name="limit_conn_zone">
124 <syntax> 124 <syntax>
125 <argument>$variable</argument> 125 <value>$variable</value>
126 <parameter>zone</parameter>=<argument>name</argument>:<argument>size</argument></syntax> 126 <literal>zone</literal>=<value>name</value>:<value>size</value></syntax>
127 <default/> 127 <default/>
128 <context>http</context> 128 <context>http</context>
129 129
130 <para> 130 <para>
131 Sets the parameters for a zone that keeps states for various keys. 131 Sets the parameters for a zone that keeps states for various keys.
154 154
155 </directive> 155 </directive>
156 156
157 <directive name="limit_zone"> 157 <directive name="limit_zone">
158 <syntax> 158 <syntax>
159 <argument>name</argument> 159 <value>name</value>
160 <argument>$variable</argument> 160 <value>$variable</value>
161 <argument>size</argument></syntax> 161 <value>size</value></syntax>
162 <default/> 162 <default/>
163 <context>http</context> 163 <context>http</context>
164 164
165 <para> 165 <para>
166 This directive is made obsolete in version 1.1.8, 166 This directive is made obsolete in version 1.1.8,
167 an equivalent <link id="limit_conn_zone"/> directive 167 an equivalent <link id="limit_conn_zone"/> directive
168 with a changed syntax should be used instead: 168 with a changed syntax should be used instead:
169 <note> 169 <note>
170 <code>limit_conn_zone</code> 170 <literal>limit_conn_zone</literal>
171 <argument>$variable</argument> 171 <value>$variable</value>
172 <parameter>zone</parameter>=<argument>name</argument>:<argument>size</argument>; 172 <literal>zone</literal>=<value>name</value>:<value>size</value>;
173 </note> 173 </note>
174 </para> 174 </para>
175 175
176 </directive> 176 </directive>
177 177