Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /app/nginx-1.6.3/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file
nginx服务管理常用命令
1
2
3
4
5
6
7
8
/app/nginx/sbin/nginx -h 查看nginx帮助信息
nginx -s stop, — fast shutdown
nginx -s quit, — graceful shutdown 字面意思为优雅的关闭,个人理解应该是安全的关闭吧
nginx -s reopen — reopening the log files 重新打开日志文件
nginx -s reload — reloading the configuration file 重新加载配置文件
# /app/nginx/sbin/nginx -t 检查配置
nginx: the configuration file /app/nginx-1.6.3/conf/nginx.conf syntax is ok
nginx: configuration file /app/nginx-1.6.3/conf/nginx.conf test is successful