nginx(8) - Linux man page

google:  mynginx.pid


https://linux.die.net/man/8/nginx

http://man.openbsd.org/OpenBSD-5.5/nginx.8


Name

nginx - HTTP and reverse proxy server, mail proxy server

Synopsis

nginx [-hqtvV?] [-c file] [-g directives] [-p prefix] [-s signal]

Description

The nginx (spelled ''engine x'') is an HTTP and reverse proxy server, as well as a mail proxy server. The nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

The options are as follows:

      -? | -h'               Print help.
-c  file' Use an alternative configuration  file.

-g directives
Set global configuration directives. See EXAMPLES for details.

-p prefix' Set prefix path. Default value is %%PREFIX%%.

-q' Suppress non-error messages during configuration testing.

-s signal' Send signal to the master process. The argument signal can be one of: stopquitreopen,reload. The following table shows the corresponding system signals.

stop' SIGTERM
quit
' SIGQUIT
reopen
' SIGUSR1
reload
' SIGHUP

-t' Don't run, just test the configuration file. The nginx checks configuration for correct syntax and then tries to open files referred in configuration.

-v' Print nginx version.

-V' Print nginx version, compiler version and configure script parameters.

Signals

The master process of nginx can handle the following signals.

SIGINT, SIGTERM'                   Shut down quickly.
SIGHUP' Reload configuration, start the new worker process with a new configuration, gracefully shut down old worker processes.
SIGQUIT' Shut down gracefully.
SIGUSR1' Reopen log files.
SIGUSR2' Upgrade  nginx  executable on the fly.
SIGWINCH' Shut down gracefully worker processes.

While there's 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 nginx 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 some IP address:

events {
debug_connection 127.0.0.1;

}

Files

%%PID_PATH%%
Contains the process ID of the  nginx listening for connections. The content of this file is not sensitive; it can be world-readable.
%%CONF_PATH%%
Main configuration file.
%%ERROR_LOG_PATH%%
Error log file.

Exit Status

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

Examples

nginx -t -c ~/mynginx.conf -g "pid /var/run/mynginx.pid; worker_processes 2;"
Test configuration file  ~/mynginx.conf  with global directives for PID and quantity of worker processes.

See Also

Documentation at http://nginx.org/ and http://sysoev.ru/nginx/.

For questions and technical support, please refer to http://nginx.org/en/support.html.

History

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

Authors

Igor Sysoev <igor@sysoev.ru>

This manual page was written by Sergey A. Osokin <osa@FreeBSD.org.ru> as a result of compilation of many nginx documents all over the world.

BSD August 10, 2011 BSD



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值