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 %%PREFIX%%.
25
26     -q             Suppress non-error messages during configuration testing.
27
28     -s signal      Send a signal to the master process.  The argument signal
29                    can be one of: stop, quit, reopen, reload.  The following
30                    table shows the corresponding system signals:
31
32                    stop    SIGTERM
33                    quit    SIGQUIT
34                    reopen  SIGUSR1
35                    reload  SIGHUP
36
37     -t             Do not run, just test the configuration file.  nginx
38                    checks the configuration file syntax and then tries to
39                    open files referenced in the configuration file.
40
41     -T             Same as -t, but additionally dump configuration files to
42                    standard output.
43
44     -V             Print the nginx version, compiler version, and configure
45                    script parameters.
46
47     -v             Print the nginx version.
48

SIGNALS

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

DEBUGGING LOG

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

ENVIRONMENT

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

FILES

88     %%PID_PATH%%
89             Contains the process ID of nginx.  The contents of this file are
90             not sensitive, so it can be world-readable.
91
92     %%CONF_PATH%%
93             The main configuration file.
94
95     %%ERROR_LOG_PATH%%
96             Error log file.
97

EXIT STATUS

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

EXAMPLES

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

SEE ALSO

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

HISTORY

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

AUTHORS

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