nginx常用命令。nginx启动命令。nginx重启命令。nginx关闭命令。nginx测试配置文件是否正确。
电脑版发表于:2018/12/14 15:55
启动命令:
start nginx
关闭命令:
nginx -s stop
nginx -s quit
nginx -s stop与nginx -s quit区别
Quit is a graceful shutdown. Nginx finishes serving the open connections before shutdown
Quit 是一个优雅的关闭方式,Nginx在退出前完成已经接受的连接请求。
Stop is a quick shutdown where is terminates in between serving the connection
Stop 是快速关闭,不管有没有正在处理的请求。
重启命令:
nginx -s reload
重新打开日志文件
nginx -s reopen
测试nginx配置文件是否正确
nginx -t -c /path/to/nginx.conf