Nginx常用命令
https://blog.csdn.net/veryisjava/article/details/72917894
nginx常用命令
启动:
cd /usr/local/nginx/sbin
./nginx
nginx服务启动后默认的进程号会放在/usr/local/nginx/logs/nginx.pid文件
cat nginx.pid 查看进程号
关闭:
kill -TERM pid 快速停止服务
kill -QUIT pid 平缓停止服务
kill -9 pid 强制停止服务
重启:
cd /usr/local/nginx
./nginx -HUP pid
./nginx -s reload
另外一些常见的命令:
./nginx -h 查看nginx所有的命令参数
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-T : test configuration, dump it 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: /usr/local/nginx/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file
————————————————
版权声明:本文为CSDN博主「小哥笔记」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/veryisjava/article/details/72917894