翻译部分:Controlling nginx
开始!
nginx can be controlled with signals.
nginx可以被信号控制。
例如: ./nginx -s reload 中的s就是signal的缩写。
The process ID of the master process is written to the file
/usr/local/nginx/logs/nginx.pid
by default.
主进程的进程ID默认被写到 /usr/local/nginx/logs/nginx.pid
文件中。
This name may be changed at configuration time, or in
nginx.conf
using the pid directive.
这个名称可以在配置时更改,也可以在nginx.conf文件中用pid命令修改。
当启动、重启、关闭nginx会读写nginx.pid
文件。
如果nginx.conf没有指定pid命令,则读的是默认文件: /usr/local/nginx/logs/nginx.pid
如果nginx.conf文件中有指定pid命令,则启动、重启和关闭时读写的则是pid命令指定的文件。
先来看下nginx目录下默认有的文件:
我把pid的默认的logs改为log:<