annotate xml/en/docs/ngx_core_module.xml @ 469:8275e169f77b

Documented the "worker_cpu_affinity" directive.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 28 Mar 2012 13:34:19 +0000
parents 571b790ddf9e
children 8e1356bd281a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3 <!DOCTYPE module SYSTEM "../../../dtd/module.dtd">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
4
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
5 <module name="Core functionality"
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6 link="/en/docs/ngx_core_module.html"
98
a10bc0cb0a6a Whitespace cleanup.
Ruslan Ermilov <ru@nginx.com>
parents: 82
diff changeset
7 lang="en">
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9 <section id="example" name="Example Configuration">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
12 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13 user www www;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 worker_processes 2;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16 error_log /var/log/nginx-error.log info;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 events {
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 use kqueue;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20 worker_connections 2048;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21 }
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23 ...
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 </section>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30 <section id="directives" name="Directives">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32 <directive name="daemon">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
33 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
34 <default>on</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 Determines whether nginx should become a daemon.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 Mainly used during development.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
45 <directive name="error_log">
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
46 <syntax>
455
571b790ddf9e error_log: documented the special value "stderr" and default logging level.
Ruslan Ermilov <ru@nginx.com>
parents: 444
diff changeset
47 <value>file</value> | <literal>stderr</literal>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
48 [<literal>debug</literal> |
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
49 <literal>info</literal> |
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
50 <literal>notice</literal> |
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
51 <literal>warn</literal> |
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
52 <literal>error</literal> |
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
53 <literal>crit</literal> |
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
54 <literal>alert</literal> |
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
55 <literal>emerg</literal>]</syntax>
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
56 <default>logs/error.log error</default>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
57 <context>main</context>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
58 <context>http</context>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
59 <context>server</context>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
60 <context>location</context>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
61
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
62 <para>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
63 Configures logging.
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
64 </para>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
65
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
66 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
67 The first parameter defines a file that will store the log.
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
68 <!--
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
69 If filename is not absolute, it is prefixed with the prefix path.
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
70 -->
455
571b790ddf9e error_log: documented the special value "stderr" and default logging level.
Ruslan Ermilov <ru@nginx.com>
parents: 444
diff changeset
71 The special value <literal>stderr</literal> selects the standard error file.
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
72 </para>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
73
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
74 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
75 The second parameter determines the level of logging.
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
76 Log levels above are listed in the order of increasing severity.
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
77 Setting a certain log level will cause all messages of
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
78 the specified and more severe log levels to be logged.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
79 For example, the default level <literal>error</literal> will
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
80 cause <literal>error</literal>, <literal>crit</literal>,
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
81 <literal>alert</literal>, and <literal>emerg</literal> messages
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
82 to be logged.
455
571b790ddf9e error_log: documented the special value "stderr" and default logging level.
Ruslan Ermilov <ru@nginx.com>
parents: 444
diff changeset
83 If this parameter is omitted then <literal>error</literal> is used.
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
84 <note>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
85 For <literal>debug</literal> logging to work, nginx needs to
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
86 be built with <literal>--with-debug</literal>.
158
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
87 </note>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
88 </para>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
89
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
90 </directive>
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
91
05e58829de2e Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
92
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 <directive name="env">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
94 <syntax><value>variable</value>[=<value>value</value>]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
95 <default>TZ</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
97
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
98 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 Allows to limit a set of environment variables, change their values,
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 or create new environment variables, for the following cases:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101 <list type="bullet">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
103 <listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104 variable inheritance during a
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
105 <link doc="control.xml" id="upgrade">live upgrade</link>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106 of an executable file;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 <listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110 use of variables by the module
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111 <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 <listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 use of variables by worker processes.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116 Please bear in mind that controlling system libraries in this way
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117 is not always possible as it is not uncommon for libraries to check
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118 variables only during initialization, well before they can be set
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 using this directive.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 An exception from this is an above mentioned
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121 <link doc="control.xml" id="upgrade">live upgrade</link>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 of an executable file.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125 </list>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
128 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 The TZ variable is always inherited and made available to the module
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
130 <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>,
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
131 unless configured explicitly.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
134 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135 Usage example:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
136 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137 env MALLOC_OPTIONS;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
138 env PERL5LIB=/data/site/modules;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139 env OPENSSL_ALLOW_PROXY_CERTS=1;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
142
444
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
143 <para>
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
144 <note>
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
145 The NGINX environment variable is used internally by nginx
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
146 and should not be set directly by the user.
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
147 </note>
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
148 </para>
43c84d19bf92 Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 289
diff changeset
149
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
150 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
151
249
0f43f2c32c0b Fixed some nits.
Ruslan Ermilov <ru@nginx.com>
parents: 226
diff changeset
152
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
153 <directive name="include">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
154 <syntax><value>file</value> | <value>mask</value></syntax>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
155 <default/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
156 <context/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
157
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
158 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
159 Includes another <value>file</value>, or files matching the
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
160 specified <value>mask</value>, into configuration.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
161 Included files should consist of
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
162 syntactically correct directives and blocks.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
163 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
164
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
165 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
166 Usage example:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
167 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
168 include mime.types;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
169 include vhosts/*.conf;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
170 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
171 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
172
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
174
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
175
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
176 <directive name="master_process">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
177 <syntax><literal>on</literal> | <literal>off</literal></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
178 <default>on</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
179 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182 Determines whether worker processes are started.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
183 This directive is intended for nginx developers.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
185
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
186 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
187
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
188
289
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
189 <directive name="pcre_jit">
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
190 <syntax><literal>on</literal> | <literal>off</literal></syntax>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
191 <default>off</default>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
192 <context>main</context>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
193 <appeared-in>1.1.12</appeared-in>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
194
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
195 <para>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
196 Enables or disables the use of “just-in-time compilation” (PCRE JIT)
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
197 for regular expressions known at configuration parse time.
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
198 </para>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
199
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
200 <para>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
201 PCRE JIT can speed up processing of regular expressions significantly.
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
202 <note>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
203 The JIT is available in PCRE libraries starting from version 8.20
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
204 built with the <literal>--enable-jit</literal> configuration parameter.
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
205 When building the PCRE library with nginx (<literal>--with-pcre=</literal>),
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
206 the JIT support should be enabled with the
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
207 <literal>--with-pcre-jit</literal> configuration parameter.
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
208 </note>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
209 </para>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
210
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
211 </directive>
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
212
df261b1ce71f Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents: 271
diff changeset
213
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
214 <directive name="pid">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
215 <syntax><value>file</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
216 <default>nginx.pid</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
217 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
218
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
219 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
220 Defines a <value>file</value> that will store the process ID of the main process.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
221 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
222
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
223 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
224
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
225
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
226 <directive name="ssl_engine">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
227 <syntax><value>device</value></syntax>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
228 <default/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
229 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
230
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
231 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
232 Defines the name of the hardware SSL accelerator.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
233 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
234
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
235 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
236
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
237
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
238 <directive name="timer_resolution">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
239 <syntax><value>interval</value></syntax>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
240 <default/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
241 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
242
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
243 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
244 Reduces timer resolution in worker processes, thus reducing the
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
245 number of <c-func>gettimeofday</c-func> system calls made.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
246 By default, <c-func>gettimeofday</c-func> is called each time
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
247 on receiving a kernel event.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
248 With reduced resolution, <c-func>gettimeofday</c-func> is only
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
249 called once per specified <value>interval</value>.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
250 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
251
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
252 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
253 Example:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
254 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
255 timer_resolution 100ms;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
256 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
257 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
258
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
259 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
260 An internal implementation of interval depends on the method used:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
261 <list type="bullet">
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
262
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
263 <listitem>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
264 an <c-def>EVFILT_TIMER</c-def> filter if <literal>kqueue</literal> is used;
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
265 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
266
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
267 <listitem>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
268 <c-func>timer_create</c-func> if <literal>eventport</literal> is used;
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
269 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
270
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
271 <listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
272 <c-func>setitimer</c-func> otherwise.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
273 </listitem>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
274
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
275 </list>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
276 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
277
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
278 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
279
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
280
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
281 <directive name="user">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
282 <syntax><value>user</value> [<value>group</value>]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
283 <default>nobody nobody</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
284 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
285
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
286 <para>
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
287 Defines <value>user</value> and <value>group</value>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
288 credentials used by worker processes.
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
289 If <value>group</value> is omitted, a group whose name equals
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
290 that of <value>user</value> is used.
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
291 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
292
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
293 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
294
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
295
469
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
296 <directive name="worker_cpu_affinity">
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
297 <syntax><value>cpumask</value> ...</syntax>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
298 <default/>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
299 <context>main</context>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
300
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
301 <para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
302 Binds worker processes to the sets of CPUs.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
303 Each CPU set is represented by a bitmask of allowed to use CPUs.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
304 There should be a separate set defined for each of the worker processes.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
305 By default, worker processes are not bound to any specific CPUs.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
306 </para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
307
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
308 <para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
309 For example,
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
310 <example>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
311 worker_processes 4;
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
312 worker_cpu_affinity 0001 0010 0100 1000;
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
313 </example>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
314 binds each worker process to a separate CPU, while
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
315 <example>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
316 worker_processes 2;
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
317 worker_cpu_affinity 0101 1010;
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
318 </example>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
319 binds the first worker process to CPU0/CPU2,
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
320 and the second worker process to CPU1/CPU3.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
321 The second example is suitable for hyper-threading.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
322 </para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
323
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
324 <para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
325 <note>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
326 The directive is only available on FreeBSD and Linux.
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
327 </note>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
328 </para>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
329
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
330 </directive>
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
331
8275e169f77b Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents: 455
diff changeset
332
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
333 <directive name="worker_priority">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
334 <syntax><value>number</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
335 <default>0</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
336 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
337
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
338 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
339 Defines a scheduling priority for worker processes like is
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
340 done by the <command>nice</command> command: a negative
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
341 <value>number</value>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
342 means higher priority.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
343 Allowed range normally varies from -20 to 20.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
344 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
345
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
346 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
347 Example:
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
348 <example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
349 worker_priority -10;
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
350 </example>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
351 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
352
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
353 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
354
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
355
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
356 <directive name="worker_processes">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
357 <syntax><value>number</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 98
diff changeset
358 <default>1</default>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
359 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
360
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
361 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
362 Defines the number of worker processes.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
363 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
364
226
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
365 <para>
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
366 The optimal value depends on many factors including (but not
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
367 limited to) the number of CPU cores, the number of hard disk
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
368 drives that store data, and load pattern.
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
369 When in doubt, setting it to the number of available CPU cores
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
370 would be a good start.
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
371 </para>
c4b33b07dcfe Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents: 158
diff changeset
372
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
373 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
374
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
375
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
376 <directive name="worker_rlimit_core">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
377 <syntax><value>size</value></syntax>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
378 <default/>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
379 <context>main</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
380
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
381 <para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
382 Changes the limit on the largest size of a core file
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
383 (<c-def>RLIMIT_CORE</c-def>) for worker processes.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
384 Used to increase the limit without restarting the main process.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
385 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
386
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
387 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
388
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
389
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
390 <directive name="worker_rlimit_nofile">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
391 <syntax><value>number</value></syntax>
82
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
392 <default/>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
393 <context>main</context>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
394
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
395 <para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
396 Changes the limit on the maximum number of open files
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
397 (<c-def>RLIMIT_NOFILE</c-def>) for worker processes.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
398 Used to increase the limit without restarting the main process.
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
399 </para>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
400
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
401 </directive>
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
402
89c31b453d40 Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents: 63
diff changeset
403
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
404 <directive name="working_directory">
271
4c6d2c614d2c Cleaned up XML tag mess:
Ruslan Ermilov <ru@nginx.com>
parents: 270
diff changeset
405 <syntax><value>directory</value></syntax>
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
406 <default/>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
407 <context>main</context>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
408
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
409 <para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
410 Defines a current working directory for a worker process.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
411 It is primarily used when writing a core-file, in which case
262
676abe405aba Changed one instance of "working process" to "worker process".
Ruslan Ermilov <ru@nginx.com>
parents: 249
diff changeset
412 a worker process should have write permission for the
63
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
413 specified directory.
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
414 </para>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
415
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
416 </directive>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
417
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
418 </section>
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
419
6108fd3217e7 Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
420 </module>