Mercurial > hg > nginx-site
annotate xml/en/docs/ngx_core_module.xml @ 1205:aab8a1667171
Syslog: added note when syslog appeared in oss and plus versions.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 27 May 2014 15:54:31 +0400 |
parents | 1594ed379f1f |
children | 4e89518a5999 |
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 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
574
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
574
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
574
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
574
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
574
diff
changeset
|
7 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../dtd/module.dtd"> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 <module name="Core functionality" |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 link="/en/docs/ngx_core_module.html" |
589 | 12 lang="en" |
1205
aab8a1667171
Syslog: added note when syslog appeared in oss and plus versions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1128
diff
changeset
|
13 rev="10"> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 <section id="example" name="Example Configuration"> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 <example> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 user www www; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 worker_processes 2; |
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 error_log /var/log/nginx-error.log info; |
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 events { |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 use kqueue; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 worker_connections 2048; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 } |
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 </example> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 </section> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 <section id="directives" name="Directives"> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 |
571
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
38 <directive name="accept_mutex"> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
39 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
40 <default>on</default> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
41 <context>events</context> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
42 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
43 <para> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
44 If <literal>accept_mutex</literal> is enabled, |
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
45 worker processes will accept new connections by turn. |
571
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
46 Otherwise, all worker processes will be notified about new connections, |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
47 and if volume of new connections is low, some of the worker processes |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
48 may just waste system resources. |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
49 <note> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
50 The use of <link doc="events.xml" id="rtsig"/> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
51 connection processing method |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
52 requires <literal>accept_mutex</literal> to be enabled. |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
53 </note> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
54 </para> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
55 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
56 </directive> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
57 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
58 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
59 <directive name="accept_mutex_delay"> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
60 <syntax><value>time</value></syntax> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
61 <default>500ms</default> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
62 <context>events</context> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
63 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
64 <para> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
65 If <link id="accept_mutex"/> is enabled, specifies the maximum time |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
66 during which a worker process will try to restart accepting new |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
67 connections if another worker process is currently accepting |
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
68 new connections. |
571
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
69 </para> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
70 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
71 </directive> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
72 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
73 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 <directive name="daemon"> |
271 | 75 <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
|
76 <default>on</default> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 Determines whether nginx should become a daemon. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 Mainly used during development. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 |
516
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
87 <directive name="debug_connection"> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
88 <syntax> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
89 <value>address</value> | |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
90 <value>CIDR</value> | |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
91 <literal>unix:</literal></syntax> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
92 <default/> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
93 <context>events</context> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
94 |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
95 <para> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
96 Enables debugging log for selected client connections. |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
97 Other connections will use logging level set by the |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
98 <link id="error_log"/> directive. |
523 | 99 Debugged connections are specified by IPv4 or IPv6 (1.3.0, 1.2.1) |
100 address or network. | |
614
0526cac4637e
Removed intimate details of the "debug_connection" directive's
Ruslan Ermilov <ru@nginx.com>
parents:
610
diff
changeset
|
101 A connection may also be specified using a hostname. |
523 | 102 For connections using UNIX-domain sockets (1.3.0, 1.2.1), |
103 debugging log is enabled by the “<literal>unix:</literal>” parameter. | |
516
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
104 <example> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
105 events { |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
106 debug_connection 127.0.0.1; |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
107 debug_connection localhost; |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
108 debug_connection 192.0.2.0/24; |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
109 debug_connection ::1; |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
110 debug_connection 2001:0db8::/32; |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
111 debug_connection unix:; |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
112 ... |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
113 } |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
114 </example> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
115 <note> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
116 For this directive to work, nginx needs to |
913
9a65d437da42
Link to "A debugging log" from "debug_connection" and "error_log".
Ruslan Ermilov <ru@nginx.com>
parents:
804
diff
changeset
|
117 be built with <literal>--with-debug</literal>, |
9a65d437da42
Link to "A debugging log" from "debug_connection" and "error_log".
Ruslan Ermilov <ru@nginx.com>
parents:
804
diff
changeset
|
118 see “<link doc="debugging_log.xml"/>”. |
516
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
119 </note> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
120 </para> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
121 |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
122 </directive> |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
123 |
8e1356bd281a
Documented the "debug_connection" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
469
diff
changeset
|
124 |
574 | 125 <directive name="debug_points"> |
126 <syntax><literal>abort</literal> | <literal>stop</literal></syntax> | |
127 <default/> | |
128 <context>main</context> | |
129 | |
130 <para> | |
131 This directive is used for debugging. | |
132 </para> | |
133 | |
134 <para> | |
135 When internal error is detected, e.g. the leak of sockets on | |
136 restart of working processes, enabling <literal>debug_points</literal> | |
137 leads to a core file creation (<literal>abort</literal>) | |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
138 or to stopping of a process (<literal>stop</literal>) for further |
574 | 139 analysis using a system debugger. |
140 </para> | |
141 | |
142 </directive> | |
143 | |
144 | |
158
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
145 <directive name="error_log"> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
146 <syntax> |
953
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
147 <value>file</value> | <literal>stderr</literal> | |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
148 <literal>syslog:</literal><literal>server</literal>=<value>address</value>[,<value>parameter</value>=<value>value</value>] |
271 | 149 [<literal>debug</literal> | |
150 <literal>info</literal> | | |
151 <literal>notice</literal> | | |
152 <literal>warn</literal> | | |
153 <literal>error</literal> | | |
154 <literal>crit</literal> | | |
155 <literal>alert</literal> | | |
156 <literal>emerg</literal>]</syntax> | |
158
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
157 <default>logs/error.log error</default> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
158 <context>main</context> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
159 <context>http</context> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
160 <context>server</context> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
161 <context>location</context> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
162 |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
163 <para> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
164 Configures logging. |
935
3860b37d56c0
Documented support for multiple "error_log" directives.
Vladimir Homutov <vl@nginx.com>
parents:
913
diff
changeset
|
165 Several logs can be specified on the same level (1.5.2). |
158
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
166 </para> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
167 |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
168 <para> |
271 | 169 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
|
170 <!-- |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
171 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
|
172 --> |
455
571b790ddf9e
error_log: documented the special value "stderr" and default logging level.
Ruslan Ermilov <ru@nginx.com>
parents:
444
diff
changeset
|
173 The special value <literal>stderr</literal> selects the standard error file. |
953
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
174 Logging to syslog can be configured by specifying |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
175 the “<literal>syslog:</literal>” prefix. |
158
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
176 </para> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
177 |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
178 <para> |
271 | 179 The second parameter determines the level of logging. |
158
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
180 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
|
181 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
|
182 the specified and more severe log levels to be logged. |
271 | 183 For example, the default level <literal>error</literal> will |
184 cause <literal>error</literal>, <literal>crit</literal>, | |
185 <literal>alert</literal>, and <literal>emerg</literal> messages | |
158
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
186 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
|
187 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
|
188 <note> |
271 | 189 For <literal>debug</literal> logging to work, nginx needs to |
913
9a65d437da42
Link to "A debugging log" from "debug_connection" and "error_log".
Ruslan Ermilov <ru@nginx.com>
parents:
804
diff
changeset
|
190 be built with <literal>--with-debug</literal>, |
9a65d437da42
Link to "A debugging log" from "debug_connection" and "error_log".
Ruslan Ermilov <ru@nginx.com>
parents:
804
diff
changeset
|
191 see “<link doc="debugging_log.xml"/>”. |
158
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
192 </note> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
193 </para> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
194 |
953
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
195 <para> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
196 The following parameters configure logging to syslog: |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
197 <list type="tag"> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
198 |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
199 <tag-name><literal>server=</literal><value>address</value></tag-name> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
200 <tag-desc> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
201 Defines an address of a syslog server. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
202 An address can be specified as a domain name or IP address, |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
203 and an optional port, or as a UNIX-domain socket path |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
204 specified after the “<literal>unix:</literal>” prefix. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
205 If port is not specified, the port 514 is used. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
206 If a domain name resolves to several IP addresses, the first resolved |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
207 address is used. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
208 </tag-desc> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
209 |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
210 <tag-name><literal>facility=</literal><value>string</value></tag-name> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
211 <tag-desc> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
212 Sets facility of syslog messages, as defined in |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
213 <link url="http://tools.ietf.org/html/rfc3164#section-4.1.1">RFC 3164</link>. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
214 Facility can be one of “<literal>kern</literal>”, “<literal>user</literal>”, |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
215 “<literal>mail</literal>”, “<literal>daemon</literal>”, |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
216 “<literal>auth</literal>”, “<literal>intern</literal>”, |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
217 “<literal>lpr</literal>”, “<literal>news</literal>”, “<literal>uucp</literal>”, |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
218 “<literal>clock</literal>”, “<literal>authpriv</literal>”, |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
219 “<literal>ftp</literal>”, “<literal>ntp</literal>”, “<literal>audit</literal>”, |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
220 “<literal>alert</literal>”, “<literal>cron</literal>”, |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
221 “<literal>local0</literal>”..“<literal>local7</literal>”. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
222 Default is “<literal>local7</literal>”. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
223 </tag-desc> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
224 |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
225 <tag-name><literal>tag=</literal><value>string</value></tag-name> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
226 <tag-desc> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
227 Sets tag of syslog messages. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
228 Default is “<literal>nginx</literal>”. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
229 </tag-desc> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
230 |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
231 <!-- |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
232 <tag-name><literal>bare=</literal><literal>on</literal> | |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
233 <literal>off</literal></tag-name> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
234 <tag-desc> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
235 If enabled, messages are sent without syslog headers. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
236 Default is <literal>off</literal>. |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
237 </tag-desc> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
238 --> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
239 |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
240 </list> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
241 Example syslog configuration: |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
242 <example> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
243 error_log syslog:server=192.168.1.1 debug; |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
244 error_log syslog:server=unix:/var/log/nginx.sock; |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
245 error_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx error; |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
246 </example> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
247 </para> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
248 |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
249 <para> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
250 <note> |
1205
aab8a1667171
Syslog: added note when syslog appeared in oss and plus versions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1128
diff
changeset
|
251 Logging to syslog is available since version 1.7.1. |
aab8a1667171
Syslog: added note when syslog appeared in oss and plus versions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1128
diff
changeset
|
252 As part of our |
aab8a1667171
Syslog: added note when syslog appeared in oss and plus versions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1128
diff
changeset
|
253 <commercial_version>commercial subscription</commercial_version> |
aab8a1667171
Syslog: added note when syslog appeared in oss and plus versions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1128
diff
changeset
|
254 logging to syslog is available since version 1.5.3. |
953
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
255 </note> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
256 </para> |
aded7086e84f
Commercial version documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
935
diff
changeset
|
257 |
158
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
258 </directive> |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
259 |
05e58829de2e
Documented the "error_log" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
260 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
261 <directive name="env"> |
271 | 262 <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
|
263 <default>TZ</default> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
264 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
265 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
266 <para> |
804
d22421dc5d00
Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
764
diff
changeset
|
267 By default, nginx removes all environment variables inherited |
d22421dc5d00
Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
764
diff
changeset
|
268 from its parent process except the TZ variable. |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
269 This directive allows preserving some of the inherited variables, |
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
270 changing their values, or creating new environment variables. |
804
d22421dc5d00
Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
764
diff
changeset
|
271 These variables are then: |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
272 <list type="bullet"> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
273 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
274 <listitem> |
804
d22421dc5d00
Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
764
diff
changeset
|
275 inherited during a <link doc="control.xml" id="upgrade">live upgrade</link> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
276 of an executable file; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
277 </listitem> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
278 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
279 <listitem> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
280 used by the |
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
281 <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link> module; |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
282 </listitem> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
283 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
284 <listitem> |
804
d22421dc5d00
Clarified the effects of the "env" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
764
diff
changeset
|
285 used by worker processes. |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
286 One should bear in mind that controlling system libraries in this way |
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
287 is not always possible as it is common for libraries to check |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
288 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
|
289 using this directive. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
290 An exception from this is an above mentioned |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
291 <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
|
292 of an executable file. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
293 </listitem> |
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 </list> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
296 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
297 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
298 <para> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
299 The TZ variable is always inherited and available to the |
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
300 <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link> |
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
301 module, unless it is configured explicitly. |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
302 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
303 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
304 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
305 Usage example: |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
306 <example> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
307 env MALLOC_OPTIONS; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
308 env PERL5LIB=/data/site/modules; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
309 env OPENSSL_ALLOW_PROXY_CERTS=1; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
310 </example> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
311 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
312 |
444
43c84d19bf92
Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
289
diff
changeset
|
313 <para> |
43c84d19bf92
Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
289
diff
changeset
|
314 <note> |
43c84d19bf92
Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
289
diff
changeset
|
315 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
|
316 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
|
317 </note> |
43c84d19bf92
Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
289
diff
changeset
|
318 </para> |
43c84d19bf92
Added a note about the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
289
diff
changeset
|
319 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
320 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
321 |
249 | 322 |
556
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
323 <directive name="events"> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
324 <syntax block="yes"/> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
325 <default/> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
326 <context>main</context> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
327 |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
328 <para> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
329 Provides the configuration file context in which the directives that |
556
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
330 affect connection processing are specified. |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
331 </para> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
332 |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
333 </directive> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
334 |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
335 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
336 <directive name="include"> |
271 | 337 <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
|
338 <default/> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
339 <context/> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
340 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
341 <para> |
271 | 342 Includes another <value>file</value>, or files matching the |
343 specified <value>mask</value>, into configuration. | |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
344 Included files should consist of |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
345 syntactically correct directives and blocks. |
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 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
348 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
349 Usage example: |
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 include mime.types; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
352 include vhosts/*.conf; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
353 </example> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
354 </para> |
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> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
357 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
358 |
571
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
359 <directive name="lock_file"> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
360 <syntax><value>file</value></syntax> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
361 <default>logs/nginx.lock</default> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
362 <context>main</context> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
363 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
364 <para> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
365 nginx uses the locking mechanism to implement <link id="accept_mutex"/> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
366 and serialize access to shared memory. |
571
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
367 On most systems the locks are implemented using atomic operations, |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
368 and this directive is ignored. |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
369 On other systems the “lock file” mechanism is used. |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
370 This directive specifies a prefix for the names of lock files. |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
371 </para> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
372 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
373 </directive> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
374 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
375 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
376 <directive name="master_process"> |
271 | 377 <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
|
378 <default>on</default> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
379 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
380 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
381 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
382 Determines whether worker processes are started. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
383 This directive is intended for nginx developers. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
384 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
385 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
386 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
387 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
388 |
571
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
389 <directive name="multi_accept"> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
390 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
391 <default>off</default> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
392 <context>events</context> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
393 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
394 <para> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
395 If <literal>multi_accept</literal> is disabled, a worker process |
571
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
396 will accept one new connection at a time. |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
397 Otherwise, a worker process |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
398 will accept all new connections at a time. |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
399 <note> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
400 The directive is ignored if <link doc="events.xml" id="kqueue"/> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
401 connection processing method is used, because it reports |
571
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
402 the number of new connections waiting to be accepted. |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
403 </note> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
404 <note> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
405 The use of <link doc="events.xml" id="rtsig"/> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
406 connection processing method |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
407 automatically enables <literal>multi_accept</literal>. |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
408 </note> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
409 </para> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
410 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
411 </directive> |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
412 |
71d775bef043
Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
Ruslan Ermilov <ru@nginx.com>
parents:
556
diff
changeset
|
413 |
289
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
414 <directive name="pcre_jit"> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
415 <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
|
416 <default>off</default> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
417 <context>main</context> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
418 <appeared-in>1.1.12</appeared-in> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
419 |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
420 <para> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
421 Enables or disables the use of “just-in-time compilation” (PCRE JIT) |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
422 for the regular expressions known by the time of configuration parsing. |
289
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
423 </para> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
424 |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
425 <para> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
426 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
|
427 <note> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
428 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
|
429 built with the <literal>--enable-jit</literal> configuration parameter. |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
430 When the PCRE library is built with nginx (<literal>--with-pcre=</literal>), |
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
431 the JIT support is enabled via the |
289
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
432 <literal>--with-pcre-jit</literal> configuration parameter. |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
433 </note> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
434 </para> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
435 |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
436 </directive> |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
437 |
df261b1ce71f
Documented the --with-pcre-jit configuration parameter
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
438 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
439 <directive name="pid"> |
271 | 440 <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
|
441 <default>nginx.pid</default> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
442 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
443 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
444 <para> |
271 | 445 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
|
446 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
447 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
448 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
449 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
450 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
451 <directive name="ssl_engine"> |
271 | 452 <syntax><value>device</value></syntax> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
453 <default/> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
454 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
455 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
456 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
457 Defines the name of the hardware SSL accelerator. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
458 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
459 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
460 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
461 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
462 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
463 <directive name="timer_resolution"> |
271 | 464 <syntax><value>interval</value></syntax> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
465 <default/> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
466 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
467 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
468 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
469 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
|
470 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
|
471 By default, <c-func>gettimeofday</c-func> is called each time |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
472 a kernel event is received. |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
473 With reduced resolution, <c-func>gettimeofday</c-func> is only |
271 | 474 called once per specified <value>interval</value>. |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
475 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
476 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
477 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
478 Example: |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
479 <example> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
480 timer_resolution 100ms; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
481 </example> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
482 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
483 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
484 <para> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
485 Internal implementation of the interval depends on the method used: |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
486 <list type="bullet"> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
487 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
488 <listitem> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
489 the <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
|
490 </listitem> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
491 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
492 <listitem> |
271 | 493 <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
|
494 </listitem> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
495 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
496 <listitem> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
497 <c-func>setitimer</c-func> otherwise. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
498 </listitem> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
499 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
500 </list> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
501 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
502 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
503 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
504 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
505 |
556
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
506 <directive name="use"> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
507 <syntax><value>method</value></syntax> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
508 <default/> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
509 <context>events</context> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
510 |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
511 <para> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
512 Specifies the <link doc="events.xml">connection processing</link> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
513 <value>method</value> to use. |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
514 There is normally no need to specify it explicitly, because nginx will |
556
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
515 by default use the most efficient method. |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
516 </para> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
517 |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
518 </directive> |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
519 |
345012910707
Documented the "events" and "use" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
554
diff
changeset
|
520 |
82
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
521 <directive name="user"> |
271 | 522 <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
|
523 <default>nobody nobody</default> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
524 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
525 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
526 <para> |
271 | 527 Defines <value>user</value> and <value>group</value> |
82
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
528 credentials used by worker processes. |
271 | 529 If <value>group</value> is omitted, a group whose name equals |
530 that of <value>user</value> is used. | |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
531 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
532 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
533 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
534 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
535 |
749
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
536 <directive name="worker_aio_requests"> |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
537 <syntax><value>number</value></syntax> |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
538 <default>32</default> |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
539 <context>events</context> |
750
6a1b1ba62cab
Documented history of "worker_aio_requests" directive.
Vladimir Homutov <vl@nginx.com>
parents:
749
diff
changeset
|
540 <appeared-in>1.1.4</appeared-in> |
6a1b1ba62cab
Documented history of "worker_aio_requests" directive.
Vladimir Homutov <vl@nginx.com>
parents:
749
diff
changeset
|
541 <appeared-in>1.0.7</appeared-in> |
749
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
542 |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
543 <para> |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
544 When using <link doc="http/ngx_http_core_module.xml" id="aio"/> |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
545 with the <link doc="../docs/events.xml" id="epoll"/> |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
546 connection processing method, sets the maximum <value>number</value> of |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
547 outstanding asynchronous I/O operations |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
548 for a single worker process. |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
549 </para> |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
550 |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
551 </directive> |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
552 |
2abb92a19101
Documented 'worker_aio_requests' directive.
Vladimir Homutov <vl@nginx.com>
parents:
742
diff
changeset
|
553 |
545
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
554 <directive name="worker_connections"> |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
555 <syntax><value>number</value></syntax> |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
556 <default>512</default> |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
557 <context>events</context> |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
558 |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
559 <para> |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
560 Sets the maximum number of simultaneous connections that |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
561 can be opened by a worker process. |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
562 </para> |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
563 |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
564 <para> |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
565 It should be kept in mind that this number includes all connections |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
566 (e.g. connections with proxied servers, among others), |
545
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
567 not only connections with clients. |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
568 Another consideration is that the actual number of simultaneous |
966 | 569 connections cannot exceed the current limit on |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
570 the maximum number of open files, which can be changed by |
545
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
571 <link id="worker_rlimit_nofile"/>. |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
572 </para> |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
573 |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
574 </directive> |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
575 |
e97b46d1842d
Documented the "worker_connections" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
576 |
469
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
577 <directive name="worker_cpu_affinity"> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
578 <syntax><value>cpumask</value> ...</syntax> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
579 <default/> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
580 <context>main</context> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
581 |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
582 <para> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
583 Binds worker processes to the sets of CPUs. |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
584 Each CPU set is represented by a bitmask of allowed CPUs. |
469
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
585 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
|
586 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
|
587 </para> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
588 |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
589 <para> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
590 For example, |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
591 <example> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
592 worker_processes 4; |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
593 worker_cpu_affinity 0001 0010 0100 1000; |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
594 </example> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
595 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
|
596 <example> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
597 worker_processes 2; |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
598 worker_cpu_affinity 0101 1010; |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
599 </example> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
600 binds the first worker process to CPU0/CPU2, |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
601 and the second worker process to CPU1/CPU3. |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
602 The second example is suitable for hyper-threading. |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
603 </para> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
604 |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
605 <para> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
606 <note> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
607 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
|
608 </note> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
609 </para> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
610 |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
611 </directive> |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
612 |
8275e169f77b
Documented the "worker_cpu_affinity" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
455
diff
changeset
|
613 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
614 <directive name="worker_priority"> |
271 | 615 <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
|
616 <default>0</default> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
617 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
618 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
619 <para> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
620 Defines the scheduling priority for worker processes like it is |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
621 done by the <command>nice</command> command: a negative |
271 | 622 <value>number</value> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
623 means higher priority. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
624 Allowed range normally varies from -20 to 20. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
625 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
626 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
627 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
628 Example: |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
629 <example> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
630 worker_priority -10; |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
631 </example> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
632 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
633 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
634 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
635 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
636 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
637 <directive name="worker_processes"> |
740
46d70031bea9
Documented the recently added "auto" parameter of the
Andrey Belov <defan@nginx.com>
parents:
659
diff
changeset
|
638 <syntax><value>number</value> | <literal>auto</literal></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
639 <default>1</default> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
640 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
641 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
642 <para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
643 Defines the number of worker processes. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
644 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
645 |
226
c4b33b07dcfe
Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents:
158
diff
changeset
|
646 <para> |
c4b33b07dcfe
Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents:
158
diff
changeset
|
647 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
|
648 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
|
649 drives that store data, and load pattern. |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
650 When one is in doubt, setting it to the number of available CPU cores |
740
46d70031bea9
Documented the recently added "auto" parameter of the
Andrey Belov <defan@nginx.com>
parents:
659
diff
changeset
|
651 would be a good start (the value “<literal>auto</literal>” |
46d70031bea9
Documented the recently added "auto" parameter of the
Andrey Belov <defan@nginx.com>
parents:
659
diff
changeset
|
652 will try to autodetect it). |
742
3a2e35f4c279
Documented that "worker_processes auto" appeared in version 1.3.8.
Ruslan Ermilov <ru@nginx.com>
parents:
740
diff
changeset
|
653 <note> |
3a2e35f4c279
Documented that "worker_processes auto" appeared in version 1.3.8.
Ruslan Ermilov <ru@nginx.com>
parents:
740
diff
changeset
|
654 The <literal>auto</literal> parameter is supported starting from |
764
f8434fdd3cd9
The "auto" parameter of the ""worker_processes" directive
Ruslan Ermilov <ru@nginx.com>
parents:
750
diff
changeset
|
655 versions 1.3.8 and 1.2.5. |
742
3a2e35f4c279
Documented that "worker_processes auto" appeared in version 1.3.8.
Ruslan Ermilov <ru@nginx.com>
parents:
740
diff
changeset
|
656 </note> |
226
c4b33b07dcfe
Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents:
158
diff
changeset
|
657 </para> |
c4b33b07dcfe
Added some basic hints on how to tune "worker_processes".
Ruslan Ermilov <ru@nginx.com>
parents:
158
diff
changeset
|
658 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
659 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
660 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
661 |
82
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
662 <directive name="worker_rlimit_core"> |
271 | 663 <syntax><value>size</value></syntax> |
82
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
664 <default/> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
665 <context>main</context> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
666 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
667 <para> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
668 Changes the limit on the largest size of a core file |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
669 (<c-def>RLIMIT_CORE</c-def>) for worker processes. |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
670 Used to increase the limit without restarting the main process. |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
671 </para> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
672 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
673 </directive> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
674 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
675 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
676 <directive name="worker_rlimit_nofile"> |
271 | 677 <syntax><value>number</value></syntax> |
82
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
678 <default/> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
679 <context>main</context> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
680 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
681 <para> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
682 Changes the limit on the maximum number of open files |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
683 (<c-def>RLIMIT_NOFILE</c-def>) for worker processes. |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
684 Used to increase the limit without restarting the main process. |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
685 </para> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
686 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
687 </directive> |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
688 |
89c31b453d40
Sorted directives alphabetically.
Ruslan Ermilov <ru@nginx.com>
parents:
63
diff
changeset
|
689 |
554
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
690 <directive name="worker_rlimit_sigpending"> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
691 <syntax><value>number</value></syntax> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
692 <default/> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
693 <context>main</context> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
694 |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
695 <para> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
696 On systems that support <link doc="events.xml" id="rtsig"/> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
697 connection processing method, |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
698 changes the limit on the number of signals that may be queued |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
699 (<c-def>RLIMIT_SIGPENDING</c-def>) for worker processes. |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
700 Used to increase the limit without restarting the main process. |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
701 </para> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
702 |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
703 </directive> |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
704 |
ccb7451af1d8
Documented the "worker_rlimit_sigpending" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
545
diff
changeset
|
705 |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
706 <directive name="working_directory"> |
271 | 707 <syntax><value>directory</value></syntax> |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
708 <default/> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
709 <context>main</context> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
710 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
711 <para> |
957
6d9d4bb571a9
Text review of the ngx_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
953
diff
changeset
|
712 Defines the current working directory for a worker process. |
63
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
713 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
|
714 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
|
715 specified directory. |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
716 </para> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
717 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
718 </directive> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
719 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
720 </section> |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
721 |
6108fd3217e7
Initial English translation of ngx_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
722 </module> |