Mercurial > hg > nginx-quic
annotate docs/man/nginx.8 @ 6791:cb4a4e9bba8e
Perl: fixed optimization in SSI command handler.
As the pointer to the first argument was tested instead of the argument
itself, array of arguments was always created, even if there were no
arguments. Fix is to test args[0] instead of args.
Found by Coverity (CID 1356862).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 01 Nov 2016 20:39:21 +0300 |
parents | 54b10b289f0f |
children | 4718a646187a |
rev | line source |
---|---|
3788 | 1 .\" |
5000 | 2 .\" Copyright (C) 2010 Sergey A. Osokin |
3 .\" Copyright (C) Nginx, Inc. | |
3788 | 4 .\" All rights reserved. |
5 .\" | |
6 .\" Redistribution and use in source and binary forms, with or without | |
7 .\" modification, are permitted provided that the following conditions | |
8 .\" are met: | |
9 .\" 1. Redistributions of source code must retain the above copyright | |
10 .\" notice, this list of conditions and the following disclaimer. | |
11 .\" 2. Redistributions in binary form must reproduce the above copyright | |
12 .\" notice, this list of conditions and the following disclaimer in the | |
13 .\" documentation and/or other materials provided with the distribution. | |
14 .\" | |
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
25 .\" SUCH DAMAGE. | |
26 .\" | |
27 .\" | |
6188
f08e80409dfd
Documentation: added -T option description to the man page.
Vladimir Homutov <vl@nginx.com>
parents:
5000
diff
changeset
|
28 .Dd June 16, 2015 |
3788 | 29 .Dt NGINX 8 |
30 .Os | |
31 .Sh NAME | |
32 .Nm nginx | |
33 .Nd "HTTP and reverse proxy server, mail proxy server" | |
34 .Sh SYNOPSIS | |
35 .Nm | |
6188
f08e80409dfd
Documentation: added -T option description to the man page.
Vladimir Homutov <vl@nginx.com>
parents:
5000
diff
changeset
|
36 .Op Fl ?hqTtVv |
3788 | 37 .Op Fl c Ar file |
38 .Op Fl g Ar directives | |
39 .Op Fl p Ar prefix | |
40 .Op Fl s Ar signal | |
41 .Sh DESCRIPTION | |
42 .Nm | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
43 (pronounced |
3788 | 44 .Dq engine x ) |
45 is an HTTP and reverse proxy server, as well as a mail proxy server. | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
46 It is known for its high performance, stability, rich feature set, simple |
3788 | 47 configuration, and low resource consumption. |
48 .Pp | |
49 The options are as follows: | |
50 .Bl -tag -width ".Fl d Ar directives" | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
51 .It Fl ?\& , h |
3788 | 52 Print help. |
53 .It Fl c Ar file | |
54 Use an alternative configuration | |
55 .Ar file . | |
56 .It Fl g Ar directives | |
57 Set global configuration directives. | |
58 See | |
59 .Sx EXAMPLES | |
60 for details. | |
61 .It Fl p Ar prefix | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
62 Set the prefix path. |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
63 The default value is |
3788 | 64 .Pa %%PREFIX%% . |
65 .It Fl q | |
66 Suppress non-error messages during configuration testing. | |
67 .It Fl s Ar signal | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
68 Send a signal to the master process. |
3788 | 69 The argument |
70 .Ar signal | |
71 can be one of: | |
72 .Cm stop , quit , reopen , reload . | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
73 The following table shows the corresponding system signals: |
3788 | 74 .Pp |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
75 .Bl -tag -width ".Cm reopen" -compact |
3788 | 76 .It Cm stop |
77 .Dv SIGTERM | |
78 .It Cm quit | |
79 .Dv SIGQUIT | |
80 .It Cm reopen | |
81 .Dv SIGUSR1 | |
82 .It Cm reload | |
83 .Dv SIGHUP | |
84 .El | |
85 .It Fl t | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
86 Do not run, just test the configuration file. |
3788 | 87 .Nm |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
88 checks the configuration file syntax and then tries to open files |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
89 referenced in the configuration file. |
6188
f08e80409dfd
Documentation: added -T option description to the man page.
Vladimir Homutov <vl@nginx.com>
parents:
5000
diff
changeset
|
90 .It Fl T |
6189
54b10b289f0f
Polished the recent change to the manpage.
Ruslan Ermilov <ru@nginx.com>
parents:
6188
diff
changeset
|
91 Same as |
54b10b289f0f
Polished the recent change to the manpage.
Ruslan Ermilov <ru@nginx.com>
parents:
6188
diff
changeset
|
92 .Fl t , |
54b10b289f0f
Polished the recent change to the manpage.
Ruslan Ermilov <ru@nginx.com>
parents:
6188
diff
changeset
|
93 but additionally dump configuration files to standard output. |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
94 .It Fl V |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
95 Print the |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
96 .Nm |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
97 version, compiler version, and |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
98 .Pa configure |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
99 script parameters. |
3788 | 100 .It Fl v |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
101 Print the |
3788 | 102 .Nm |
103 version. | |
104 .El | |
105 .Sh SIGNALS | |
106 The master process of | |
107 .Nm | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
108 can handle the following signals: |
3788 | 109 .Pp |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
110 .Bl -tag -width ".Dv SIGINT , SIGTERM" -compact |
3788 | 111 .It Dv SIGINT , SIGTERM |
112 Shut down quickly. | |
113 .It Dv SIGHUP | |
114 Reload configuration, start the new worker process with a new | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
115 configuration, and gracefully shut down old worker processes. |
3788 | 116 .It Dv SIGQUIT |
117 Shut down gracefully. | |
118 .It Dv SIGUSR1 | |
119 Reopen log files. | |
120 .It Dv SIGUSR2 | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
121 Upgrade the |
3788 | 122 .Nm |
123 executable on the fly. | |
124 .It Dv SIGWINCH | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
125 Shut down worker processes gracefully. |
3788 | 126 .El |
127 .Pp | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
128 While there is no need to explicitly control worker processes normally, |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
129 they support some signals too: |
3788 | 130 .Pp |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
131 .Bl -tag -width ".Dv SIGINT , SIGTERM" -compact |
3788 | 132 .It Dv SIGTERM |
133 Shut down quickly. | |
134 .It Dv SIGQUIT | |
135 Shut down gracefully. | |
136 .It Dv SIGUSR1 | |
137 Reopen log files. | |
138 .El | |
139 .Sh DEBUGGING LOG | |
140 To enable a debugging log, reconfigure | |
141 .Nm | |
142 to build with debugging: | |
143 .Pp | |
144 .Dl "./configure --with-debug ..." | |
145 .Pp | |
146 and then set the | |
147 .Cm debug | |
148 level of the | |
149 .Va error_log : | |
150 .Pp | |
151 .Dl "error_log /path/to/log debug;" | |
152 .Pp | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
153 It is also possible to enable the debugging for a particular IP address: |
3788 | 154 .Bd -literal -offset indent |
155 events { | |
156 debug_connection 127.0.0.1; | |
157 } | |
158 .Ed | |
4525
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
159 .Sh ENVIRONMENT |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
160 The |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
161 .Ev NGINX |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
162 environment variable is used internally by |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
163 .Nm |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
164 and should not be set directly by the user. |
3788 | 165 .Sh FILES |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
166 .Bl -tag -width indent |
3788 | 167 .It Pa %%PID_PATH%% |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
168 Contains the process ID of |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
169 .Nm . |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
170 The contents of this file are not sensitive, so it can be world-readable. |
3788 | 171 .It Pa %%CONF_PATH%% |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
172 The main configuration file. |
3788 | 173 .It Pa %%ERROR_LOG_PATH%% |
174 Error log file. | |
175 .El | |
176 .Sh EXIT STATUS | |
177 Exit status is 0 on success, or 1 if the command fails. | |
178 .Sh EXAMPLES | |
179 Test configuration file | |
180 .Pa ~/mynginx.conf | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
181 with global directives for PID and quantity of worker processes: |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
182 .Bd -literal -offset indent |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
183 nginx -t -c ~/mynginx.conf \e |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
184 -g "pid /var/run/mynginx.pid; worker_processes 2;" |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
185 .Ed |
3788 | 186 .Sh SEE ALSO |
4001
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
187 .\"Xr nginx.conf 5 |
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
188 .\"Pp |
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
189 Documentation at |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
190 .Pa http://nginx.org/en/docs/ . |
4001
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
191 .Pp |
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
192 For questions and technical support, please refer to |
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
193 .Pa http://nginx.org/en/support.html . |
3788 | 194 .Sh HISTORY |
195 Development of | |
196 .Nm | |
3800 | 197 started in 2002, with the first public release on October 4, 2004. |
3788 | 198 .Sh AUTHORS |
4001
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
199 .An -nosplit |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
200 .An Igor Sysoev Aq igor@sysoev.ru . |
3788 | 201 .Pp |
4525
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
202 This manual page was originally written by |
3788 | 203 .An Sergey A. Osokin Aq osa@FreeBSD.org.ru |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
204 as a result of compiling many |
3788 | 205 .Nm |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
206 documents from all over the world. |