欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

nginx常用的几个命令

程序员文章站 2022-03-01 17:06:08
...

nginx常用的几个命令:

#启动nginx
./nginx
#查看nginx版本
./nginx -v
#关闭nginx
./nginx -s stop
#查看nginx启动情况
ps -ef | grep nginx
#重新加载
./nginx -s reload

例子:

[[email protected] sbin]# pwd
/usr/local/nginx/sbin
[[email protected] sbin]# 
[[email protected] sbin]# ./nginx -v
[[email protected] sbin]# ./nginx -s stop
[[email protected] sbin]# ps -ef | grep nginx 
root      48634   8057  0 20:24 pts/1    00:00:00 grep --color=auto nginx
[[email protected] sbin]# ./nginx 
[[email protected] sbin]# ps -ef | grep nginx 
root      48662      1  0 20:26 ?        00:00:00 nginx: master process ./nginx
nobody    48663  48662  0 20:26 ?        00:00:00 nginx: worker process
root      48675   8057  0 20:26 pts/1    00:00:00 grep --color=auto nginx
[[email protected] sbin]# 
[[email protected] sbin]# ./nginx -s reload