annotate docs/man/nginx.8 @ 9299:2706b60dc225 default tip

Core: error logging rate limiting. With this change, error logging to files can be rate-limited with the "rate=" parameter. The parameter specifies allowed log messages rate to a particular file (per worker), in messages per second (m/s). By default, "rate=1000m/s" is used. Rate limiting is implemented using the "leaky bucket" method, similarly to the limit_req module. Maximum burst size is set to the number of log messages per second for each severity level, so "error" messages are logged even if the rate limit is hit by "info" messages (but not vice versa). When the limit is reached for a particular level, the "too many log messages, limiting" message is logged at this level. If debug logging is enabled, either for the particular log file or for the particular connection, rate limiting is not used.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 25 Jun 2024 22:58:56 +0300
parents 985b0bda403c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1 .\"
7608
4718a646187a Update manpage, sort command line options.
Sergey A. Osokin <osa@FreeBSD.org.ru>
parents: 6189
diff changeset
2 .\" Copyright (C) 2010, 2019 Sergey A. Osokin
5000
2552afcb74d3 Year 2013.
Ruslan Ermilov <ru@nginx.com>
parents: 4525
diff changeset
3 .\" Copyright (C) Nginx, Inc.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
4 .\" All rights reserved.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5 .\"
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
6 .\" Redistribution and use in source and binary forms, with or without
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
7 .\" modification, are permitted provided that the following conditions
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
8 .\" are met:
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
9 .\" 1. Redistributions of source code must retain the above copyright
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
10 .\" notice, this list of conditions and the following disclaimer.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
11 .\" 2. Redistributions in binary form must reproduce the above copyright
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
12 .\" notice, this list of conditions and the following disclaimer in the
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
13 .\" documentation and/or other materials provided with the distribution.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
14 .\"
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
25 .\" SUCH DAMAGE.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
26 .\"
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
27 .\"
7744
f18db38a9826 Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents: 7608
diff changeset
28 .Dd November 5, 2020
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
29 .Dt NGINX 8
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
30 .Os
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
31 .Sh NAME
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
32 .Nm nginx
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
33 .Nd "HTTP and reverse proxy server, mail proxy server"
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
34 .Sh SYNOPSIS
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
37 .Op Fl c Ar file
7744
f18db38a9826 Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents: 7608
diff changeset
38 .Op Fl e Ar file
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
39 .Op Fl g Ar directives
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
40 .Op Fl p Ar prefix
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
41 .Op Fl s Ar signal
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
42 .Sh DESCRIPTION
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
43 .Nm
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
44 (pronounced
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
45 .Dq engine x )
7608
4718a646187a Update manpage, sort command line options.
Sergey A. Osokin <osa@FreeBSD.org.ru>
parents: 6189
diff changeset
46 is an HTTP and reverse proxy server, a mail proxy server, and a generic
4718a646187a Update manpage, sort command line options.
Sergey A. Osokin <osa@FreeBSD.org.ru>
parents: 6189
diff changeset
47 TCP/UDP proxy server.
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
48 It is known for its high performance, stability, rich feature set, simple
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
49 configuration, and low resource consumption.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
50 .Pp
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
51 The options are as follows:
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
52 .Bl -tag -width ".Fl d Ar directives"
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
53 .It Fl ?\& , h
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
54 Print help.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
55 .It Fl c Ar file
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
56 Use an alternative configuration
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
57 .Ar file .
7744
f18db38a9826 Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents: 7608
diff changeset
58 .It Fl e Ar file
f18db38a9826 Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents: 7608
diff changeset
59 Use an alternative error log
f18db38a9826 Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents: 7608
diff changeset
60 .Ar file .
f18db38a9826 Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents: 7608
diff changeset
61 Special value
f18db38a9826 Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents: 7608
diff changeset
62 .Cm stderr
f18db38a9826 Core: "-e" command line option.
Igor Ippolitov <iippolitov@nginx.com>
parents: 7608
diff changeset
63 indicates that the standard error output should be used.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
64 .It Fl g Ar directives
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
65 Set global configuration directives.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
66 See
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
67 .Sx EXAMPLES
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
68 for details.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
69 .It Fl p Ar prefix
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
70 Set the prefix path.
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
71 The default value is
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
72 .Pa %%PREFIX%% .
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
73 .It Fl q
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
74 Suppress non-error messages during configuration testing.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
75 .It Fl s Ar signal
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
76 Send a signal to the master process.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
77 The argument
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
78 .Ar signal
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
79 can be one of:
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
80 .Cm stop , quit , reopen , reload .
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
81 The following table shows the corresponding system signals:
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
82 .Pp
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
83 .Bl -tag -width ".Cm reopen" -compact
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
84 .It Cm stop
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
85 .Dv SIGTERM
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
86 .It Cm quit
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
87 .Dv SIGQUIT
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
88 .It Cm reopen
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
89 .Dv SIGUSR1
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
90 .It Cm reload
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
91 .Dv SIGHUP
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
92 .El
7608
4718a646187a Update manpage, sort command line options.
Sergey A. Osokin <osa@FreeBSD.org.ru>
parents: 6189
diff changeset
93 .It Fl T
4718a646187a Update manpage, sort command line options.
Sergey A. Osokin <osa@FreeBSD.org.ru>
parents: 6189
diff changeset
94 Same as
4718a646187a Update manpage, sort command line options.
Sergey A. Osokin <osa@FreeBSD.org.ru>
parents: 6189
diff changeset
95 .Fl t ,
4718a646187a Update manpage, sort command line options.
Sergey A. Osokin <osa@FreeBSD.org.ru>
parents: 6189
diff changeset
96 but additionally dump configuration files to standard output.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
97 .It Fl t
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
98 Do not run, just test the configuration file.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
99 .Nm
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
100 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
101 referenced in the configuration file.
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
102 .It Fl V
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
103 Print the
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
104 .Nm
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
105 version, compiler version, and
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
106 .Pa configure
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
107 script parameters.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
108 .It Fl v
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
109 Print the
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
110 .Nm
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
111 version.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
112 .El
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
113 .Sh SIGNALS
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
114 The master process of
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
115 .Nm
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
116 can handle the following signals:
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
117 .Pp
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
118 .Bl -tag -width ".Dv SIGINT , SIGTERM" -compact
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
119 .It Dv SIGINT , SIGTERM
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
120 Shut down quickly.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
121 .It Dv SIGHUP
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
122 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
123 configuration, and gracefully shut down old worker processes.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
124 .It Dv SIGQUIT
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
125 Shut down gracefully.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
126 .It Dv SIGUSR1
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
127 Reopen log files.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
128 .It Dv SIGUSR2
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
129 Upgrade the
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
130 .Nm
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
131 executable on the fly.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
132 .It Dv SIGWINCH
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
133 Shut down worker processes gracefully.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
134 .El
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
135 .Pp
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
136 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
137 they support some signals too:
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
138 .Pp
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
139 .Bl -tag -width ".Dv SIGINT , SIGTERM" -compact
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
140 .It Dv SIGTERM
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
141 Shut down quickly.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
142 .It Dv SIGQUIT
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
143 Shut down gracefully.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
144 .It Dv SIGUSR1
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
145 Reopen log files.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
146 .El
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
147 .Sh DEBUGGING LOG
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
148 To enable a debugging log, reconfigure
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
149 .Nm
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
150 to build with debugging:
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
151 .Pp
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
152 .Dl "./configure --with-debug ..."
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
153 .Pp
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
154 and then set the
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
155 .Cm debug
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
156 level of the
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
157 .Va error_log :
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
158 .Pp
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
159 .Dl "error_log /path/to/log debug;"
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
160 .Pp
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
161 It is also possible to enable the debugging for a particular IP address:
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
162 .Bd -literal -offset indent
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
163 events {
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
164 debug_connection 127.0.0.1;
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
165 }
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
166 .Ed
4525
3ac1c784be40 Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 4523
diff changeset
167 .Sh ENVIRONMENT
3ac1c784be40 Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 4523
diff changeset
168 The
3ac1c784be40 Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 4523
diff changeset
169 .Ev NGINX
3ac1c784be40 Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 4523
diff changeset
170 environment variable is used internally by
3ac1c784be40 Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 4523
diff changeset
171 .Nm
3ac1c784be40 Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 4523
diff changeset
172 and should not be set directly by the user.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
173 .Sh FILES
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
174 .Bl -tag -width indent
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
175 .It Pa %%PID_PATH%%
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
176 Contains the process ID of
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
177 .Nm .
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
178 The contents of this file are not sensitive, so it can be world-readable.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
179 .It Pa %%CONF_PATH%%
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
180 The main configuration file.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
181 .It Pa %%ERROR_LOG_PATH%%
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
182 Error log file.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
183 .El
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
184 .Sh EXIT STATUS
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
185 Exit status is 0 on success, or 1 if the command fails.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
186 .Sh EXAMPLES
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
187 Test configuration file
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
188 .Pa ~/mynginx.conf
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
189 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
190 .Bd -literal -offset indent
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
191 nginx -t -c ~/mynginx.conf \e
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
192 -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
193 .Ed
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
194 .Sh SEE ALSO
4001
6df31b324bbf - Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents: 4000
diff changeset
195 .\"Xr nginx.conf 5
6df31b324bbf - Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents: 4000
diff changeset
196 .\"Pp
6df31b324bbf - Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents: 4000
diff changeset
197 Documentation at
9212
985b0bda403c Free nginx: changed domain to freenginx.org.
Maxim Dounin <mdounin@mdounin.ru>
parents: 7745
diff changeset
198 .Pa http://freenginx.org/en/docs/ .
4001
6df31b324bbf - Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents: 4000
diff changeset
199 .Pp
6df31b324bbf - Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents: 4000
diff changeset
200 For questions and technical support, please refer to
9212
985b0bda403c Free nginx: changed domain to freenginx.org.
Maxim Dounin <mdounin@mdounin.ru>
parents: 7745
diff changeset
201 .Pa http://freenginx.org/en/support.html .
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
202 .Sh HISTORY
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
203 Development of
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
204 .Nm
3800
8baa96142289 add the first release date
Igor Sysoev <igor@sysoev.ru>
parents: 3788
diff changeset
205 started in 2002, with the first public release on October 4, 2004.
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
206 .Sh AUTHORS
4001
6df31b324bbf - Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents: 4000
diff changeset
207 .An -nosplit
7745
f57a478aa16d Use .Mt to mark up email addresses.
Sergey Kandaurov <pluknet@nginx.com>
parents: 7744
diff changeset
208 .An Igor Sysoev Aq Mt igor@sysoev.ru .
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
209 .Pp
4525
3ac1c784be40 Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents: 4523
diff changeset
210 This manual page was originally written by
7745
f57a478aa16d Use .Mt to mark up email addresses.
Sergey Kandaurov <pluknet@nginx.com>
parents: 7744
diff changeset
211 .An Sergey A. Osokin Aq Mt osa@FreeBSD.org.ru
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
212 as a result of compiling many
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
213 .Nm
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
214 documents from all over the world.