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
建議每次更改配置文件都先執(zhí)行命令檢查一下配置文件是否配置成功。
2.nginx相關命令
查看nginx啟動狀態(tài)
systemctl status nginx
重啟加載nginx
systemctl reload nginx
強制重啟nginx
systemctl restart nginx
停止nginx文章來源:http://www.zghlxwxcb.cn/news/detail-610459.html
systemctl stop nginx
禁用nginx文章來源地址http://www.zghlxwxcb.cn/news/detail-610459.html
systemctl disable nginx
到了這里,關于Job for nginx.service failed because the control process exited with error code.的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!