Job for nginx.service failed because the control process exited with error code. See “systemctl stat

使用systemctl start nginx 启动nginx的时候,报错:Job for nginx.service failed because the control process exited with error code. See “systemctl stat。

我们可以通过命令查看nginx的配置文件是否修改正确

[root@localhost/etc/nginx]$sudo nginx -t
nginx: [emerg] unexpected "}" in /etc/nginx/nginx.conf:42
nginx: configuration file /etc/nginx/nginx.conf test failed

主要原因是我少写了分号导致的

upstream tomcats {
server 192.168.75.140:8080
server 192.168.75.141:8080

}

修改之后:

upstream tomcats {
server 192.168.75.140:8080;
server 192.168.75.141:8080;

}

posted on 2024-05-27 15:54  ~码铃薯~  阅读(847)  评论(0)    收藏  举报

导航