nginx (8) Linux Manual Page
nginx – HTTP and reverse proxy server, mail proxy server
Synopsis
[-?hqTtVv [-c file ] ] [-g directives ] [-p prefix ] [-s signal ]
Description
(pronounced “engine x” is an HTTP and reverse proxy server, as well as a mail proxy server. It is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption. The options are as follows:
-? , h- Print help.
-cfile- Use an alternative configuration file
-gdirectives- Set global configuration directives. See Sx EXAMPLES for details.
-pprefix- Set the prefix path. The default value is %%PREFIX%%
-q- Suppress non-error messages during configuration testing.
-ssignal- Send a signal to the master process. The argument signal can be one of:
stop , quit , reopen , reloadThe following table shows the corresponding system signals: stopSIGTERMquitSIGQUITreopenSIGUSR1reloadSIGHUP
-t
-T
t but additionally dump configuration files to standard output.
-V
-v
Signals
The master process of can handle the following signals:
SIGINT , SIGTERM- Shut down quickly.
SIGHUP- Reload configuration, start the new worker process with a new configuration, and gracefully shut down old worker processes.
SIGQUIT- Shut down gracefully.
SIGUSR1- Reopen log files.
SIGUSR2- Upgrade the executable on the fly.
SIGWINCH- Shut down worker processes gracefully.
While there is no need to explicitly control worker processes normally, they support some signals too:
SIGTERM- Shut down quickly.
SIGQUIT- Shut down gracefully.
SIGUSR1- Reopen log files.
Debugging Log
To enable a debugging log, reconfigure to build with debugging:
"./configure --with-debug ..."
and then set the debug level of the error_log
"error_log /path/to/log debug;"
It is also possible to enable the debugging for a particular IP address:
events {
debug_connection 127.0.0.1;
}
Environment
The NGINX environment variable is used internally by and should not be set directly by the user.
Files
%%PID_PATH%%- Contains the process ID of
.The contents of this file are not sensitive, so it can be world-readable. %%CONF_PATH%%- The main configuration file.
%%ERROR_LOG_PATH%%- Error log file.
Exit Status
Exit status is 0 on success, or 1 if the command fails.
Examples
Test configuration file ~/mynginx.conf with global directives for PID and quantity of worker processes:
nginx -t -c ~/mynginx.conf \ -g "pid /var/run/mynginx.pid; worker_processes 2;"
See Also
Documentation at http://nginx.org/en/docs/
For questions and technical support, please refer to http://nginx.org/en/support.html
History
Development of started in 2002, with the first public release on October 4, 2004.
Authors
An -nosplit An Igor Sysoev Aq igor [at] sysoev.ru .
This manual page was originally written by An Sergey A. Osokin Aq osa [at] FreeBSD.org.ru as a result of compiling many documents from all over the world.
