概述
问题描述:
配置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 开机启动报错An error occurred.所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复