nginx进行项目域名配置时提示Job for nginx.service failed

ps aux | grep  nginx 
/bin/systemctl stop nginx.service
/bin/systemctl start nginx.service
/bin/systemctl restart nginx.service
/bin/systemctl reload 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. error.log

解决问题:提示这个错误请不要去网上找那些没有用的回答,提示错误已经提示的很明显了, 让我们去var/log/nginx下面看下error.log文件吧

我的提示两个错误:
1、nginx open() "" failed (13: Permission denied), client
解决办法:给域名访问日志保存路径文件设置777权限

2、Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8095 failed (13: Permission denied)
解决办法:权限拒绝,经检查发现是开启selinux 导致的
getenforce 查看是否开启了selinux  [disabled 或 permissive是关闭, enforcing是开启]

setenforce 0    ##设置SELinux 成为permissive模式
setenforce 1    ##设置SELinux 成为enforcing模式

  

posted on 2017-10-17 10:33  loveking_阳  阅读(491)  评论(0编辑  收藏  举报

导航