在CentOS Stream 9下的Linux服务器上用docker搭Nginx+MySQL+PHP环境做测试访问“echo phpinfo();”时,前端报“An error occurred”,具体如下。
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 the error log for details.
Faithfully yours, nginx.
nginx的error.log打印出了“[error] 22#22: *7 connect() failed (113: No route to host) while connecting to upstream, client: x.x.x.x, server: localhost, request: “GET /phpinfo.php HTTP/1.1”, upstream: “fastcgi://172.18.0.4:9000”, host: “x.x.x.x””。
这个时候只要把防火墙关闭掉即可解决问题。
systemctl stop firewalld
systemctl disable firewalld.service
展开阅读全文
上一篇: 解决CentOS Stream 9报Errors during downloading metadata for repository ‘baseos’