linux – 在Ubuntu中重启Nginx
发布时间:2020-12-13 23:18:37 所属栏目:Linux 来源:网络整理
导读:我用这个 sh file来安装Nginx.但是当我修改nginx.conf并尝试重新加载或重新启动Nginx时,它没有重启. 这个命令 sudo systemctl restart nginx 给我 sudo: unable to resolve host localhost.localdomain sudo: systemctl: command not found 还有这个 sudo se
我用这个
sh file来安装Nginx.但是当我修改nginx.conf并尝试重新加载或重新启动Nginx时,它没有重启.
这个命令 sudo systemctl restart nginx 给我 sudo: unable to resolve host localhost.localdomain sudo: systemctl: command not found 还有这个 sudo service nginx restart sudo: unable to resolve host localhost.localdomain nginx: unrecognized service 还有这个 sudo /etc/init.d/nginx restart sudo: unable to resolve host localhost.localdomain sudo: /etc/init.d/nginx: command not found 解决方法
文件可能在那里:/usr/local/nginx / sbin / nginx
确定你可以这样做: ps aux | grep nginx 杀死进程: sudo killall nginx 然后重新开始: /usr/local/nginx/sbin/nginx (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |