nginx启动命令:

nginx

nginx重启动命令:

nginx -s reload

nginx关闭的命令:

nginx -s stop

如果提示 -bash:

nginx: command not found

就执行:

whereis nginx

然后进入sbin目录 把里面的nginx文件放到/bin目录里面就可以执行上面的命令了.