手机扫一扫访问本页内容

微信扫描点右上角"···"分享到好友或朋友圈

关闭
微信扫一扫可打开小程序

微信长按图片或搜“分享录”可打开小程序

关闭

搭LNMP环境报“[error] 22#22: *7 connect() failed (113: No route to host) while connecting to upstream”

在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

展开阅读全文


上一篇:

下一篇:

服务器又要到期了鼓励一下吧
您还可以访问本站的小程序、公众号等所有端,或者下载APP, 在小程序、APP上可以评论文章以及保存图片还有在线客服哦,如您有任何疑问或建议可向作者提出意见反馈
扫码打开小程序可评论文章保存图片,在“我的”有实时在线客服哦,看效果?
关注我的公众号为您分享各类有用信息
分享录多端跨平台系统