Mercurial > hg > nginx-quic
annotate docs/man/nginx.8 @ 5905:2f7e557eab5b
Cache: proxy_cache_lock_age and friends.
Once this age is reached, the cache lock is discarded and another
request can acquire the lock. Requests which failed to acquire
the lock are not allowed to cache the response.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 18 Nov 2014 20:41:12 +0300 |
parents | 2552afcb74d3 |
children | f08e80409dfd |
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 .\" | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
28 .Dd March 6, 2012 |
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 | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
36 .Op Fl ?hqtVv |
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. |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
90 .It Fl V |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
91 Print the |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
92 .Nm |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
93 version, compiler version, and |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
94 .Pa configure |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
95 script parameters. |
3788 | 96 .It Fl v |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
97 Print the |
3788 | 98 .Nm |
99 version. | |
100 .El | |
101 .Sh SIGNALS | |
102 The master process of | |
103 .Nm | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
104 can handle the following signals: |
3788 | 105 .Pp |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
106 .Bl -tag -width ".Dv SIGINT , SIGTERM" -compact |
3788 | 107 .It Dv SIGINT , SIGTERM |
108 Shut down quickly. | |
109 .It Dv SIGHUP | |
110 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
|
111 configuration, and gracefully shut down old worker processes. |
3788 | 112 .It Dv SIGQUIT |
113 Shut down gracefully. | |
114 .It Dv SIGUSR1 | |
115 Reopen log files. | |
116 .It Dv SIGUSR2 | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
117 Upgrade the |
3788 | 118 .Nm |
119 executable on the fly. | |
120 .It Dv SIGWINCH | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
121 Shut down worker processes gracefully. |
3788 | 122 .El |
123 .Pp | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
124 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
|
125 they support some signals too: |
3788 | 126 .Pp |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
127 .Bl -tag -width ".Dv SIGINT , SIGTERM" -compact |
3788 | 128 .It Dv SIGTERM |
129 Shut down quickly. | |
130 .It Dv SIGQUIT | |
131 Shut down gracefully. | |
132 .It Dv SIGUSR1 | |
133 Reopen log files. | |
134 .El | |
135 .Sh DEBUGGING LOG | |
136 To enable a debugging log, reconfigure | |
137 .Nm | |
138 to build with debugging: | |
139 .Pp | |
140 .Dl "./configure --with-debug ..." | |
141 .Pp | |
142 and then set the | |
143 .Cm debug | |
144 level of the | |
145 .Va error_log : | |
146 .Pp | |
147 .Dl "error_log /path/to/log debug;" | |
148 .Pp | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
149 It is also possible to enable the debugging for a particular IP address: |
3788 | 150 .Bd -literal -offset indent |
151 events { | |
152 debug_connection 127.0.0.1; | |
153 } | |
154 .Ed | |
4525
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
155 .Sh ENVIRONMENT |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
156 The |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
157 .Ev NGINX |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
158 environment variable is used internally by |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
159 .Nm |
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
160 and should not be set directly by the user. |
3788 | 161 .Sh FILES |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
162 .Bl -tag -width indent |
3788 | 163 .It Pa %%PID_PATH%% |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
164 Contains the process ID of |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
165 .Nm . |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
166 The contents of this file are not sensitive, so it can be world-readable. |
3788 | 167 .It Pa %%CONF_PATH%% |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
168 The main configuration file. |
3788 | 169 .It Pa %%ERROR_LOG_PATH%% |
170 Error log file. | |
171 .El | |
172 .Sh EXIT STATUS | |
173 Exit status is 0 on success, or 1 if the command fails. | |
174 .Sh EXAMPLES | |
175 Test configuration file | |
176 .Pa ~/mynginx.conf | |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
177 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
|
178 .Bd -literal -offset indent |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
179 nginx -t -c ~/mynginx.conf \e |
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
180 -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
|
181 .Ed |
3788 | 182 .Sh SEE ALSO |
4001
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
183 .\"Xr nginx.conf 5 |
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
184 .\"Pp |
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
185 Documentation at |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
186 .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
|
187 .Pp |
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
188 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
|
189 .Pa http://nginx.org/en/support.html . |
3788 | 190 .Sh HISTORY |
191 Development of | |
192 .Nm | |
3800 | 193 started in 2002, with the first public release on October 4, 2004. |
3788 | 194 .Sh AUTHORS |
4001
6df31b324bbf
- Replaced explicit link to bugtracker with a support link
Ruslan Ermilov <ru@nginx.com>
parents:
4000
diff
changeset
|
195 .An -nosplit |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
196 .An Igor Sysoev Aq igor@sysoev.ru . |
3788 | 197 .Pp |
4525
3ac1c784be40
Mentioned the NGINX environment variable.
Ruslan Ermilov <ru@nginx.com>
parents:
4523
diff
changeset
|
198 This manual page was originally written by |
3788 | 199 .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
|
200 as a result of compiling many |
3788 | 201 .Nm |
4523
731c71ef051b
- Applied some of the OpenBSD changes.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
202 documents from all over the world. |