1. nginx启动报错:
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
这个错误是nginx.conf配置文件里面配置错误,可以使用命令检查在哪里出错
nginx -t
出错的地方:
nginx: [emerg] invalid number of arguments in "proxy_pass" directive in
/etc/nginx/conf/nginx.conf:82
进行改正,并再次检查。输出以下信息表示ok。
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
启动nginx:
systemctl start nginx
建议每次更改配置文件都先执行命令检查一下配置文件是否配置成功。
2.nginx相关命令
查看nginx启动状态
systemctl status nginx
重启加载nginx
systemctl reload nginx
强制重启nginx
systemctl restart nginx
停止nginx文章来源:https://www.toymoban.com/news/detail-610459.html
systemctl stop nginx
禁用nginx文章来源地址https://www.toymoban.com/news/detail-610459.html
systemctl disable nginx
到了这里,关于Job for nginx.service failed because the control process exited with error code.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!