问题描述:
配置nginx的开机启动后,nginx正常启动但是访问的网页访问不到错误
An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.
If you are the system administrator of this resource then you should check theerror log for details.
Faithfully yours, nginx.
查看错误日志
2020/04/28 15:49:08 [crit] 4130#4130: *2 connect() to 127.0.0.1:8085 failed (13: Permission denied) while connecting to upstream, client: 192.168.1.155, server: localhost, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://127.0.0.1:8085/favicon.ico”, host: “192.168.1.61”, referrer: “http://192.168.1.61/views/user/login.html”
查询解决办法是selinux的问题
方案一
- 查看selinux的状态
getenforce
- 修改selinux状态
#vim /etc/selinux/config
SELINUX=disabled #SELINUX=enforcing 初始状态
重启机器即可
方案二
setsebool -P httpd_can_network_connect 1
最后
以上就是热情铃铛最近收集整理的关于nginx 开机启动报错An error occurred.的全部内容,更多相关nginx内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复