Centos7启动nginx报错

启动nginx报错
[root@VM_0_4_centos sbin]# systemctl restart nginx.service
Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.

这种错误一般都是目录不存在或者权限不足,所以直接执行下面两条命令即可。
[root@VM_0_4_centos sbin]# cd /var/tmp/
[root@VM_0_4_centos tmp]# mkdir -p /var/tmp/nginx/{client,proxy,fastcgi,uwsgi,scgi}

再重新启动即可
[root@VM_0_4_centos nginx]# systemctl restart nginx.service

发表评论