使用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;
}
标签:control,because,8080,failed,192.168,server,nginx,systemctl From: https://www.cnblogs.com/dongyaotou/p/18215735