Klaus Demo nginx / e1a30b4
add nginx.8 man page Igor Sysoev 8 years ago
2 changed file(s) with 209 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
7373
7474 cat << END >> $NGX_MAKEFILE
7575
76 man:
77 sed -e "s|%%PREFIX%%|$NGX_PREFIX|" \\
78 -e "s|%%PID_PATH%%|$NGX_PID_PATH|" \\
79 -e "s|%%CONF_PATH%%|$NGX_CONF_PATH|" \\
80 -e "s|%%ERROR_LOG_PATH%%|$NGX_ERROR_LOG_PATH|" \\
81 < docs/man/nginx.8 > $NGX_OBJS/nginx.8
82
7683 install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \
7784 $NGX_INSTALL_PERL_MODULES
7885 test -d '\$(DESTDIR)$NGX_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_PREFIX'
145152
146153 build:
147154 \$(MAKE) -f $NGX_MAKEFILE
155 \$(MAKE) -f $NGX_MAKEFILE man
148156
149157 install:
150158 \$(MAKE) -f $NGX_MAKEFILE install
0 .\"
1 .\" Copyright (c) 2010 Sergey A. Osokin
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\"
26 .Dd November 14, 2010
27 .Dt NGINX 8
28 .Os
29 .Sh NAME
30 .Nm nginx
31 .Nd "HTTP and reverse proxy server, mail proxy server"
32 .Sh SYNOPSIS
33 .Nm
34 .Op Fl hqtvV?
35 .Op Fl c Ar file
36 .Op Fl g Ar directives
37 .Op Fl p Ar prefix
38 .Op Fl s Ar signal
39 .Sh DESCRIPTION
40 The
41 .Nm
42 (spelled
43 .Dq engine x )
44 is an HTTP and reverse proxy server, as well as a mail proxy server.
45 The
46 .Nm
47 is known for its high performance, stability, rich feature set, simple
48 configuration, and low resource consumption.
49 .Pp
50 The options are as follows:
51 .Bl -tag -width ".Fl d Ar directives"
52 .It Fl ?\& | h
53 Print help.
54 .It Fl c Ar file
55 Use an alternative configuration
56 .Ar file .
57 .It Fl g Ar directives
58 Set global configuration directives.
59 See
60 .Sx EXAMPLES
61 for details.
62 .It Fl p Ar prefix
63 Set prefix path.
64 Default value is
65 .Pa %%PREFIX%% .
66 .It Fl q
67 Suppress non-error messages during configuration testing.
68 .It Fl s Ar signal
69 Send signal to the master process.
70 The argument
71 .Ar signal
72 can be one of:
73 .Cm stop , quit , reopen , reload .
74 The following table shows the corresponding system signals.
75 .Pp
76 .Bl -tag -width ".It Cm reopen" -compact
77 .It Cm stop
78 .Dv SIGTERM
79 .It Cm quit
80 .Dv SIGQUIT
81 .It Cm reopen
82 .Dv SIGUSR1
83 .It Cm reload
84 .Dv SIGHUP
85 .El
86 .It Fl t
87 Don't run, just test the configuration file.
88 The
89 .Nm
90 checks configuration for correct syntax and then tries to open files
91 referred in configuration.
92 .It Fl v
93 Print
94 .Nm
95 version.
96 .It Fl V
97 Print
98 .Nm
99 version, compiler version and
100 .Pa configure
101 script parameters.
102 .El
103 .Sh SIGNALS
104 The master process of
105 .Nm
106 can handle the following signals.
107 .Pp
108 .Bl -tag -width ".It Dv SIGINT , SIGTERM" -compact
109 .It Dv SIGINT , SIGTERM
110 Shut down quickly.
111 .It Dv SIGHUP
112 Reload configuration, start the new worker process with a new
113 configuration, gracefully shut down old worker processes.
114 .It Dv SIGQUIT
115 Shut down gracefully.
116 .It Dv SIGUSR1
117 Reopen log files.
118 .It Dv SIGUSR2
119 Upgrade
120 .Nm
121 executable on the fly.
122 .It Dv SIGWINCH
123 Shut down gracefully worker processes.
124 .El
125 .Pp
126 While there's no need to explicitly control worker processes normally,
127 they support some signals, too:
128 .Pp
129 .Bl -tag -width ".It Dv SIGINT , SIGTERM" -compact
130 .It Dv SIGTERM
131 Shut down quickly.
132 .It Dv SIGQUIT
133 Shut down gracefully.
134 .It Dv SIGUSR1
135 Reopen log files.
136 .El
137 .Sh DEBUGGING LOG
138 To enable a debugging log, reconfigure
139 .Nm
140 to build with debugging:
141 .Pp
142 .Dl "./configure --with-debug ..."
143 .Pp
144 and then set the
145 .Cm debug
146 level of the
147 .Va error_log :
148 .Pp
149 .Dl "error_log /path/to/log debug;"
150 .Pp
151 It is also possible to enable the debugging for some IP address:
152 .Bd -literal -offset indent
153 events {
154 debug_connection 127.0.0.1;
155 }
156 .Ed
157 .Sh FILES
158 .Bl -tag -width indent -compact
159 .It Pa %%PID_PATH%%
160 Contains the process ID of the
161 .Nm
162 listening for connections.
163 The content of this file is not sensitive; it can be world-readable.
164 .It Pa %%CONF_PATH%%
165 Main configuration file.
166 .It Pa %%ERROR_LOG_PATH%%
167 Error log file.
168 .El
169 .Sh EXIT STATUS
170 Exit status is 0 on success, or 1 if the command fails.
171 .Sh EXAMPLES
172 .Bd -literal
173 nginx -t -c ~/mynginx.conf -g "pid /var/run/mynginx.pid; worker_processes 2;"
174 .Ed
175 Test configuration file
176 .Pa ~/mynginx.conf
177 with global directives for PID and quantity of worker processes.
178 .Sh SEE ALSO
179 .Xr nginx.conf 5
180 .Sh HISTORY
181 Development of
182 .Nm
183 started in 2002, with the first public release in 2004.
184 .Sh AUTHORS
185 .An Igor Sysoev Aq igor@sysoev.ru
186 .Pp
187 Documentation available on
188 .Pa http://nginx.org/
189 and
190 .Pa http://sysoev.ru/nginx/ .
191 .Pp
192 This manual page was written by
193 .An Sergey A. Osokin Aq osa@FreeBSD.org.ru
194 as a result of compilation of many
195 .Nm
196 documents all over the world.
197 .Sh BUGS
198 Report to mailing list
199 .Aq Li nginx@nginx.org
200 if you found one.