sudo systemctl restart nginx
重启nginx(如果你的机子上是apache就重启apache),然后查看nginx的状态:sudo systemctl status nginx
具体重启步骤为:
(1)使用
sudo netstat -tulnp | grep :80
命令查看80端口监听的服务,我的机子上显示的80端口是nginx(2)查看所有nginx相关的进程:
ps -aux | grep nginx
(3)杀死所有相关进程:sudo kill -9 PID,比如我要杀死:
sudo kill -9 15319 3493 3494 3495