常用Nginx命令

bash

# 启动
sudo systemctl start nginx

# 停止
sudo systemctl stop nginx

# 重启(会短暂中断服务)
sudo systemctl restart nginx

# 平滑重启(不中断服务,刚才你就该用这个)
sudo systemctl reload nginx

# 测试配置文件
sudo nginx -t

# 查看状态
sudo systemctl status nginx

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注