Mercurial > hg > nginx-site
comparison xml/en/docs/ngx_core_module.xml @ 63:6108fd3217e7
Initial English translation of ngx_core_module.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Sun, 09 Oct 2011 12:36:39 +0000 |
parents | |
children | 89c31b453d40 |
comparison
equal
deleted
inserted
replaced
62:89759c3c6ba2 | 63:6108fd3217e7 |
---|---|
1 <?xml version="1.0"?> | |
2 | |
3 <!DOCTYPE module SYSTEM "../../../dtd/module.dtd"> | |
4 | |
5 <module name="Core functionality" | |
6 link="/en/docs/ngx_core_module.html" | |
7 lang="en"> | |
8 | |
9 <section id="example" name="Example Configuration"> | |
10 | |
11 <para> | |
12 <example> | |
13 user www www; | |
14 worker_processes 2; | |
15 | |
16 error_log /var/log/nginx-error.log info; | |
17 | |
18 events { | |
19 use kqueue; | |
20 worker_connections 2048; | |
21 } | |
22 | |
23 ... | |
24 </example> | |
25 </para> | |
26 | |
27 </section> | |
28 | |
29 | |
30 <section id="directives" name="Directives"> | |
31 | |
32 <directive name="daemon"> | |
33 <syntax>daemon <value>on</value> | <value>off</value></syntax> | |
34 <default>daemon on</default> | |
35 <context>main</context> | |
36 | |
37 <para> | |
38 Determines whether nginx should become a daemon. | |
39 Mainly used during development. | |
40 </para> | |
41 | |
42 </directive> | |
43 | |
44 | |
45 <directive name="env"> | |
46 <syntax>env <argument>VAR</argument>[=<argument>VALUE</argument>]</syntax> | |
47 <default>env TZ</default> | |
48 <context>main</context> | |
49 | |
50 <para> | |
51 Allows to limit a set of environment variables, change their values, | |
52 or create new environment variables, for the following cases: | |
53 <list type="bullet"> | |
54 | |
55 <listitem> | |
56 variable inheritance during a | |
57 <link doc="control.xml" id="upgrade">live upgrade</link> | |
58 of an executable file; | |
59 </listitem> | |
60 | |
61 <listitem> | |
62 use of variables by the module | |
63 <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>; | |
64 </listitem> | |
65 | |
66 <listitem> | |
67 use of variables by worker processes. | |
68 Please bear in mind that controlling system libraries in this way | |
69 is not always possible as it is not uncommon for libraries to check | |
70 variables only during initialization, well before they can be set | |
71 using this directive. | |
72 An exception from this is an above mentioned | |
73 <link doc="control.xml" id="upgrade">live upgrade</link> | |
74 of an executable file. | |
75 </listitem> | |
76 | |
77 </list> | |
78 </para> | |
79 | |
80 <para> | |
81 The TZ variable is always inherited and made available to the module | |
82 <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>, | |
83 unless configured explicitly. | |
84 </para> | |
85 | |
86 <para> | |
87 Usage example: | |
88 <example> | |
89 env MALLOC_OPTIONS; | |
90 env PERL5LIB=/data/site/modules; | |
91 env OPENSSL_ALLOW_PROXY_CERTS=1; | |
92 </example> | |
93 </para> | |
94 | |
95 </directive> | |
96 | |
97 <directive name="include"> | |
98 <syntax>include <argument>file</argument> | <argument>mask</argument></syntax> | |
99 <default/> | |
100 <context/> | |
101 | |
102 <para> | |
103 Includes another <argument>file</argument>, or files matching the | |
104 specified <argument>mask</argument>, into configuration. | |
105 Included files should consist of | |
106 syntactically correct directives and blocks. | |
107 </para> | |
108 | |
109 <para> | |
110 Usage example: | |
111 <example> | |
112 include mime.types; | |
113 include vhosts/*.conf; | |
114 </example> | |
115 </para> | |
116 | |
117 </directive> | |
118 | |
119 | |
120 <directive name="master_process"> | |
121 <syntax>master_process <value>on</value> | <value>off</value></syntax> | |
122 <default>master_process on</default> | |
123 <context>main</context> | |
124 | |
125 <para> | |
126 Determines whether worker processes are started. | |
127 This directive is intended for nginx developers. | |
128 </para> | |
129 | |
130 </directive> | |
131 | |
132 | |
133 <directive name="pid"> | |
134 <syntax>pid <argument>file</argument></syntax> | |
135 <default>pid nginx.pid</default> | |
136 <context>main</context> | |
137 | |
138 <para> | |
139 Defines a <argument>file</argument> which will store the process ID of the main process. | |
140 </para> | |
141 | |
142 </directive> | |
143 | |
144 | |
145 <directive name="ssl_engine"> | |
146 <syntax>ssl_engine <argument>device</argument></syntax> | |
147 <default/> | |
148 <context>main</context> | |
149 | |
150 <para> | |
151 Defines the name of the hardware SSL accelerator. | |
152 </para> | |
153 | |
154 </directive> | |
155 | |
156 | |
157 <directive name="user"> | |
158 <syntax>user <argument>user</argument> [<argument>group</argument>]</syntax> | |
159 <default>user nobody nobody</default> | |
160 <context>main</context> | |
161 | |
162 <para> | |
163 Defines <argument>user</argument> and <argument>group</argument> | |
164 credentials used by worker processes. | |
165 If <argument>group</argument> is omitted, a group whose name equals | |
166 that of <argument>user</argument> is used. | |
167 </para> | |
168 | |
169 </directive> | |
170 | |
171 | |
172 <directive name="timer_resolution"> | |
173 <syntax>timer_resolution <argument>interval</argument></syntax> | |
174 <default/> | |
175 <context>main</context> | |
176 | |
177 <para> | |
178 Reduces timer resolution in worker processes, thus reducing the | |
179 number of <c-func>gettimeofday</c-func> system calls made. | |
180 By default, <c-func>gettimeofday</c-func> is called each time | |
181 on receiving a kernel event. | |
182 With reduced resolution, <c-func>gettimeofday</c-func> is only | |
183 called once per specified <argument>interval</argument>. | |
184 </para> | |
185 | |
186 <para> | |
187 Example: | |
188 <example> | |
189 timer_resolution 100ms; | |
190 </example> | |
191 </para> | |
192 | |
193 <para> | |
194 An internal implementation of interval depends on the method used: | |
195 <list type="bullet"> | |
196 | |
197 <listitem> | |
198 an <c-def>EVFILT_TIMER</c-def> filter if <value>kqueue</value> is used; | |
199 </listitem> | |
200 | |
201 <listitem> | |
202 <c-func>timer_create</c-func> if <value>eventport</value> is used; | |
203 </listitem> | |
204 | |
205 <listitem> | |
206 <c-func>setitimer</c-func> otherwise. | |
207 </listitem> | |
208 | |
209 </list> | |
210 </para> | |
211 | |
212 </directive> | |
213 | |
214 | |
215 <directive name="worker_rlimit_core"> | |
216 <syntax>worker_rlimit_core <argument>size</argument></syntax> | |
217 <default/> | |
218 <context>main</context> | |
219 | |
220 <para> | |
221 Changes the limit on the largest size of a core file | |
222 (<c-def>RLIMIT_CORE</c-def>) for worker processes. | |
223 Used to increase the limit without restarting the main process. | |
224 </para> | |
225 | |
226 </directive> | |
227 | |
228 | |
229 <directive name="worker_rlimit_nofile"> | |
230 <syntax>worker_rlimit_nofile <argument>number</argument></syntax> | |
231 <default/> | |
232 <context>main</context> | |
233 | |
234 <para> | |
235 Changes the limit on the maximum number of open files | |
236 (<c-def>RLIMIT_NOFILE</c-def>) for worker processes. | |
237 Used to increase the limit without restarting the main process. | |
238 </para> | |
239 | |
240 </directive> | |
241 | |
242 | |
243 <directive name="worker_priority"> | |
244 <syntax>worker_priority <argument>number</argument></syntax> | |
245 <default>worker_priority 0</default> | |
246 <context>main</context> | |
247 | |
248 <para> | |
249 Defines a scheduling priority for worker processes like is | |
250 done by the <command>nice</command> command: a negative | |
251 <argument>number</argument> | |
252 means higher priority. | |
253 Allowed range normally varies from -20 to 20. | |
254 </para> | |
255 | |
256 <para> | |
257 Example: | |
258 <example> | |
259 worker_priority -10; | |
260 </example> | |
261 </para> | |
262 | |
263 </directive> | |
264 | |
265 | |
266 <directive name="worker_processes"> | |
267 <syntax>worker_processes <argument>number</argument></syntax> | |
268 <default>worker_processes 1</default> | |
269 <context>main</context> | |
270 | |
271 <para> | |
272 Defines the number of worker processes. | |
273 </para> | |
274 | |
275 </directive> | |
276 | |
277 | |
278 <directive name="working_directory"> | |
279 <syntax>working_directory <argument>directory</argument></syntax> | |
280 <default/> | |
281 <context>main</context> | |
282 | |
283 <para> | |
284 Defines a current working directory for a worker process. | |
285 It is primarily used when writing a core-file, in which case | |
286 a working process should have write permission for the | |
287 specified directory. | |
288 </para> | |
289 | |
290 </directive> | |
291 | |
292 </section> | |
293 | |
294 </module> |