is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server. It is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

The options are as follows:

Print help.

Use an alternative configuration

Use an alternative error log

Special value

indicates that the standard error output should be used.

Set global configuration directives. See

for details.

Set the prefix path. The default value is

Suppress non-error messages during configuration testing.

Send a signal to the master process. The argument

can be one of:

The following table shows the corresponding system signals:

Same as

but additionally dump configuration files to standard output.

Do not run, just test the configuration file.

checks the configuration file syntax and then tries to open files referenced in the configuration file.

Print the

version, compiler version, and

script parameters.

Print the


The master process of

can handle the following signals:

Shut down quickly.

Reload configuration, start the new worker process with a new configuration, and gracefully shut down old worker processes.

Shut down gracefully.

Reopen log files.

Upgrade the

executable on the fly.

Shut down worker processes gracefully.

While there is no need to explicitly control worker processes normally, they support some signals too:

Shut down quickly.

Shut down gracefully.

Reopen log files.

To enable a debugging log, reconfigure

to build with debugging:

and then set the

level of the

It is also possible to enable the debugging for a particular IP address:

events { debug_connection; }


environment variable is used internally by

and should not be set directly by the user.

Contains the process ID of

The contents of this file are not sensitive, so it can be world-readable.

The main configuration file.

Error log file.

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

Test configuration file

with global directives for PID and quantity of worker processes:

nginx -t -c ~/mynginx.conf \ -g "pid /var/run/mynginx.pid; worker_processes 2;"

Documentation at

For questions and technical support, please refer to

Development of

started in 2002, with the first public release on October 4, 2004.

This manual page was originally written by

as a result of compiling many

documents from all over the world.