1NGINX(8)                  BSD System Manager's Manual                 NGINX(8)
2

NAME

4     nginx — HTTP and reverse proxy server, mail proxy server
5

SYNOPSIS

7     nginx [-?hqTtVv] [-c file] [-g directives] [-p prefix] [-s signal]
8

DESCRIPTION

10     nginx (pronounced “engine x”) is an HTTP and reverse proxy server, as
11     well as a mail proxy server.  It is known for its high performance, sta‐
12     bility, rich feature set, simple configuration, and low resource consump‐
13     tion.
14
15     The options are as follows:
16
17     -?, -h         Print help.
18
19     -c file        Use an alternative configuration file.
20
21     -g directives  Set global configuration directives.  See EXAMPLES for
22                    details.
23
24     -p prefix      Set the prefix path.  The default value is
25                    /usr/share/nginx.
26
27     -q             Suppress non-error messages during configuration testing.
28
29     -s signal      Send a signal to the master process.  The argument signal
30                    can be one of: stop, quit, reopen, reload.  The following
31                    table shows the corresponding system signals:
32
33                    stop    SIGTERM
34                    quit    SIGQUIT
35                    reopen  SIGUSR1
36                    reload  SIGHUP
37
38     -t             Do not run, just test the configuration file.  nginx
39                    checks the configuration file syntax and then tries to
40                    open files referenced in the configuration file.
41
42     -T             Same as -t, but additionally dump configuration files to
43                    standard output.
44
45     -V             Print the nginx version, compiler version, and configure
46                    script parameters.
47
48     -v             Print the nginx version.
49

SIGNALS

51     The master process of nginx can handle the following signals:
52
53     SIGINT, SIGTERM  Shut down quickly.
54     SIGHUP           Reload configuration, start the new worker process with
55                      a new configuration, and gracefully shut down old worker
56                      processes.
57     SIGQUIT          Shut down gracefully.
58     SIGUSR1          Reopen log files.
59     SIGUSR2          Upgrade the nginx executable on the fly.
60     SIGWINCH         Shut down worker processes gracefully.
61
62     While there is no need to explicitly control worker processes normally,
63     they support some signals too:
64
65     SIGTERM          Shut down quickly.
66     SIGQUIT          Shut down gracefully.
67     SIGUSR1          Reopen log files.
68

DEBUGGING LOG

70     To enable a debugging log, reconfigure nginx to build with debugging:
71
72           ./configure --with-debug ...
73
74     and then set the debug level of the error_log:
75
76           error_log /path/to/log debug;
77
78     It is also possible to enable the debugging for a particular IP address:
79
80           events {
81                   debug_connection 127.0.0.1;
82           }
83

ENVIRONMENT

85     The NGINX environment variable is used internally by nginx and should not
86     be set directly by the user.
87

FILES

89     /run/nginx.pid
90             Contains the process ID of nginx.  The contents of this file are
91             not sensitive, so it can be world-readable.
92
93     /etc/nginx/nginx.conf
94             The main configuration file.
95
96     /var/log/nginx/error.log
97             Error log file.
98

EXIT STATUS

100     Exit status is 0 on success, or 1 if the command fails.
101

EXAMPLES

103     Test configuration file ~/mynginx.conf with global directives for PID and
104     quantity of worker processes:
105
106           nginx -t -c ~/mynginx.conf \
107                   -g "pid /var/run/mynginx.pid; worker_processes 2;"
108

SEE ALSO

110     Documentation at http://nginx.org/en/docs/.
111
112     For questions and technical support, please refer to
113     http://nginx.org/en/support.html.
114

HISTORY

116     Development of nginx started in 2002, with the first public release on
117     October 4, 2004.
118

AUTHORS

120     Igor Sysoev <igor@sysoev.ru>.
121
122     This manual page was originally written by Sergey A. Osokin
123     <osa@FreeBSD.org.ru> as a result of compiling many nginx documents from
124     all over the world.
125
126BSD                              June 16, 2015                             BSD
Impressum