优米格
分享有营养的

nginx upstream permission denied错误解决

BraUndress.png

nginx报错日志出现如下信息:

2021/09/23 14:06:46 [crit] 66317#66317: *4363 connect() to 127.0.0.1:21613 failed (13: Permission denied) while connecting to upstream, client: 112.8.215.47, server: v3.coding996.com, request: "GET /weixin HTTP/1.1", upstream: "http://127.0.0.1:21613/weixin", host: "v3.coding996.com"

出错原因:开启了SELinux。

查看是否开启SELinux命令:

getenforce

解决办法:

setsebool -P httpd_can_network_connect 1

Reference

1.(13: Permission denied) while connecting to upstream:[nginx]

赞(2)
未经允许禁止转载:优米格 » nginx upstream permission denied错误解决

评论 抢沙发

合作&反馈&投稿

商务合作、问题反馈、投稿,欢迎联系

广告合作侵权联系