Back to home page

Nginx displayed by LXR

Source navigation ]
Diff markup ]
Identifier search ]
general search ]
 
 
Version: nginx-1.13.12 ]​[ nginx-1.12.2 ]​

0001 .\"
0002 .\" Copyright (C) 2010 Sergey A. Osokin
0003 .\" Copyright (C) Nginx, Inc.
0004 .\" All rights reserved.
0005 .\"
0006 .\" Redistribution and use in source and binary forms, with or without
0007 .\" modification, are permitted provided that the following conditions
0008 .\" are met:
0009 .\" 1. Redistributions of source code must retain the above copyright
0010 .\"    notice, this list of conditions and the following disclaimer.
0011 .\" 2. Redistributions in binary form must reproduce the above copyright
0012 .\"    notice, this list of conditions and the following disclaimer in the
0013 .\"    documentation and/or other materials provided with the distribution.
0014 .\"
0015 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
0016 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0017 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0018 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
0019 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
0020 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
0021 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
0022 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
0023 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
0024 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
0025 .\" SUCH DAMAGE.
0026 .\"
0027 .\"
0028 .Dd June 16, 2015
0029 .Dt NGINX 8
0030 .Os
0031 .Sh NAME
0032 .Nm nginx
0033 .Nd "HTTP and reverse proxy server, mail proxy server"
0034 .Sh SYNOPSIS
0035 .Nm
0036 .Op Fl ?hqTtVv
0037 .Op Fl c Ar file
0038 .Op Fl g Ar directives
0039 .Op Fl p Ar prefix
0040 .Op Fl s Ar signal
0041 .Sh DESCRIPTION
0042 .Nm
0043 (pronounced
0044 .Dq engine x )
0045 is an HTTP and reverse proxy server, as well as a mail proxy server.
0046 It is known for its high performance, stability, rich feature set, simple
0047 configuration, and low resource consumption.
0048 .Pp
0049 The options are as follows:
0050 .Bl -tag -width ".Fl d Ar directives"
0051 .It Fl ?\& , h
0052 Print help.
0053 .It Fl c Ar file
0054 Use an alternative configuration
0055 .Ar file .
0056 .It Fl g Ar directives
0057 Set global configuration directives.
0058 See
0059 .Sx EXAMPLES
0060 for details.
0061 .It Fl p Ar prefix
0062 Set the prefix path.
0063 The default value is
0064 .Pa %%PREFIX%% .
0065 .It Fl q
0066 Suppress non-error messages during configuration testing.
0067 .It Fl s Ar signal
0068 Send a signal to the master process.
0069 The argument
0070 .Ar signal
0071 can be one of:
0072 .Cm stop , quit , reopen , reload .
0073 The following table shows the corresponding system signals:
0074 .Pp
0075 .Bl -tag -width ".Cm reopen" -compact
0076 .It Cm stop
0077 .Dv SIGTERM
0078 .It Cm quit
0079 .Dv SIGQUIT
0080 .It Cm reopen
0081 .Dv SIGUSR1
0082 .It Cm reload
0083 .Dv SIGHUP
0084 .El
0085 .It Fl t
0086 Do not run, just test the configuration file.
0087 .Nm
0088 checks the configuration file syntax and then tries to open files
0089 referenced in the configuration file.
0090 .It Fl T
0091 Same as
0092 .Fl t ,
0093 but additionally dump configuration files to standard output.
0094 .It Fl V
0095 Print the
0096 .Nm
0097 version, compiler version, and
0098 .Pa configure
0099 script parameters.
0100 .It Fl v
0101 Print the
0102 .Nm
0103 version.
0104 .El
0105 .Sh SIGNALS
0106 The master process of
0107 .Nm
0108 can handle the following signals:
0109 .Pp
0110 .Bl -tag -width ".Dv SIGINT , SIGTERM" -compact
0111 .It Dv SIGINT , SIGTERM
0112 Shut down quickly.
0113 .It Dv SIGHUP
0114 Reload configuration, start the new worker process with a new
0115 configuration, and gracefully shut down old worker processes.
0116 .It Dv SIGQUIT
0117 Shut down gracefully.
0118 .It Dv SIGUSR1
0119 Reopen log files.
0120 .It Dv SIGUSR2
0121 Upgrade the
0122 .Nm
0123 executable on the fly.
0124 .It Dv SIGWINCH
0125 Shut down worker processes gracefully.
0126 .El
0127 .Pp
0128 While there is no need to explicitly control worker processes normally,
0129 they support some signals too:
0130 .Pp
0131 .Bl -tag -width ".Dv SIGINT , SIGTERM" -compact
0132 .It Dv SIGTERM
0133 Shut down quickly.
0134 .It Dv SIGQUIT
0135 Shut down gracefully.
0136 .It Dv SIGUSR1
0137 Reopen log files.
0138 .El
0139 .Sh DEBUGGING LOG
0140 To enable a debugging log, reconfigure
0141 .Nm
0142 to build with debugging:
0143 .Pp
0144 .Dl "./configure --with-debug ..."
0145 .Pp
0146 and then set the
0147 .Cm debug
0148 level of the
0149 .Va error_log :
0150 .Pp
0151 .Dl "error_log /path/to/log debug;"
0152 .Pp
0153 It is also possible to enable the debugging for a particular IP address:
0154 .Bd -literal -offset indent
0155 events {
0156         debug_connection 127.0.0.1;
0157 }
0158 .Ed
0159 .Sh ENVIRONMENT
0160 The
0161 .Ev NGINX
0162 environment variable is used internally by
0163 .Nm
0164 and should not be set directly by the user.
0165 .Sh FILES
0166 .Bl -tag -width indent
0167 .It Pa %%PID_PATH%%
0168 Contains the process ID of
0169 .Nm .
0170 The contents of this file are not sensitive, so it can be world-readable.
0171 .It Pa %%CONF_PATH%%
0172 The main configuration file.
0173 .It Pa %%ERROR_LOG_PATH%%
0174 Error log file.
0175 .El
0176 .Sh EXIT STATUS
0177 Exit status is 0 on success, or 1 if the command fails.
0178 .Sh EXAMPLES
0179 Test configuration file
0180 .Pa ~/mynginx.conf
0181 with global directives for PID and quantity of worker processes:
0182 .Bd -literal -offset indent
0183 nginx -t -c ~/mynginx.conf \e
0184         -g "pid /var/run/mynginx.pid; worker_processes 2;"
0185 .Ed
0186 .Sh SEE ALSO
0187 .\"Xr nginx.conf 5
0188 .\"Pp
0189 Documentation at
0190 .Pa http://nginx.org/en/docs/ .
0191 .Pp
0192 For questions and technical support, please refer to
0193 .Pa http://nginx.org/en/support.html .
0194 .Sh HISTORY
0195 Development of
0196 .Nm
0197 started in 2002, with the first public release on October 4, 2004.
0198 .Sh AUTHORS
0199 .An -nosplit
0200 .An Igor Sysoev Aq igor@sysoev.ru .
0201 .Pp
0202 This manual page was originally written by
0203 .An Sergey A. Osokin Aq osa@FreeBSD.org.ru
0204 as a result of compiling many
0205 .Nm
0206 documents from all over the world.