1.停止Nginx服务的四种方法
冷静地停止服务
此方法比stop更平稳,因此必须在流程完成当前工作后才能停止。
nginx -s quit
立即停止服务
这种方法强硬,直接停止进程,无论进程是否在工作。
nginx-s停止
系统停止
systemctl是Linux命令
systemctl stop nginx.service
用基尔醇法杀害工艺
直接杀死过程,在上面无效的情况下使用,态度强硬,简单粗暴!
killall nginx
2.启动Nginx
nginx直接开始
nginx systemctl命令启动
systemctlstartnginx.service http://www.Sina.com /
psaux|grep nginx 3358 www.Sina.com /
systemctlrestartnginx.service http://www.Sina.com /
如果系统配置文件有任何修改,此命令建议不要停止重新启动,以免报告错误。
nginx-s reload http://www.Sina.com /
netstat -tlnp