annotate docs/man/nginx.8 @ 7604:7aa20af4ac00

Rewrite: fixed segfault with rewritten URI and "alias". The "alias" directive cannot be used in the same location where URI was rewritten. This has been detected in the "rewrite ... break" case, but not when the standalone "break" directive was used. This change also fixes proxy_pass with URI component in a similar case: location /aaa/ { rewrite ^ /xxx/yyy; break; proxy_pass http://localhost:8080/bbb/; } Previously, the "/bbb/yyy" would be sent to a backend instead of "/xxx/yyy". And if location's prefix was longer than the rewritten URI, a segmentation fault might occur.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 16 Dec 2019 15:19:01 +0300
parents 54b10b289f0f
children 4718a646187a
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 .\"
5000
2552afcb74d3 Year 2013.
Ruslan Ermilov <ru@nginx.com>
parents: 4525
diff changeset
2 .\" Copyright (C) 2010 Sergey A. Osokin
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 .\"
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
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
38 .Op Fl g Ar directives
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
39 .Op Fl p Ar prefix
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
40 .Op Fl s Ar signal
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
41 .Sh DESCRIPTION
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
42 .Nm
4523
731c71ef051b - Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
43 (pronounced
3788
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
44 .Dq engine x )
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
47 configuration, and low resource consumption.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
48 .Pp
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
49 The options are as follows:
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
52 Print help.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
53 .It Fl c Ar file
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
54 Use an alternative configuration
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
55 .Ar file .
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
56 .It Fl g Ar directives
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
57 Set global configuration directives.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
58 See
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
59 .Sx EXAMPLES
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
60 for details.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
64 .Pa %%PREFIX%% .
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
65 .It Fl q
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
66 Suppress non-error messages during configuration testing.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
69 The argument
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
70 .Ar signal
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
71 can be one of:
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
76 .It Cm stop
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
77 .Dv SIGTERM
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
78 .It Cm quit
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
79 .Dv SIGQUIT
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
80 .It Cm reopen
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
81 .Dv SIGUSR1
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
82 .It Cm reload
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
83 .Dv SIGHUP
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
84 .El
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
102 .Nm
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
103 version.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
104 .El
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
105 .Sh SIGNALS
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
106 The master process of
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
111 .It Dv SIGINT , SIGTERM
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
112 Shut down quickly.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
113 .It Dv SIGHUP
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
116 .It Dv SIGQUIT
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
117 Shut down gracefully.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
118 .It Dv SIGUSR1
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
119 Reopen log files.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
122 .Nm
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
123 executable on the fly.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
126 .El
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
132 .It Dv SIGTERM
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
133 Shut down quickly.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
134 .It Dv SIGQUIT
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
135 Shut down gracefully.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
136 .It Dv SIGUSR1
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
137 Reopen log files.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
138 .El
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
139 .Sh DEBUGGING LOG
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
140 To enable a debugging log, reconfigure
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
141 .Nm
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
142 to build with debugging:
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
143 .Pp
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
144 .Dl "./configure --with-debug ..."
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
145 .Pp
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
146 and then set the
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
147 .Cm debug
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
148 level of the
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
149 .Va error_log :
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
150 .Pp
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
151 .Dl "error_log /path/to/log debug;"
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
154 .Bd -literal -offset indent
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
155 events {
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
156 debug_connection 127.0.0.1;
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
157 }
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
173 .It Pa %%ERROR_LOG_PATH%%
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
174 Error log file.
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
175 .El
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
176 .Sh EXIT STATUS
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
177 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
178 .Sh EXAMPLES
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
179 Test configuration file
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
194 .Sh HISTORY
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
195 Development of
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
196 .Nm
3800
8baa96142289 add the first release date
Igor Sysoev <igor@sysoev.ru>
parents: 3788
diff changeset
197 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
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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
b50daa26aa22 add nginx.8 man page
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
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.