欢迎光临
感受代码之美

nginx upstream permission denied错误解决

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]

赞(0)
未经允许禁止转载:四个空格 » nginx upstream permission denied错误解决

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址