nginx upstream permission denied错误解决
本文不再更新,可能存在内容过时的情况,实时更新请访问原地址:nginx upstream permission denied错误解决;
本文不再更新,可能存在内容过时的情况,实时更新请访问原地址:nginx upstream permission denied错误解决;
本文不再更新,可能存在内容过时的情况,实时更新请访问原地址: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
https://www.4spaces.org/nginx-upstream-permission-denied-error/