Linux问题记录1--Nginx配置反向代理时出现的13: Permission denied) while connecting to upstream, client: 127.0.0.1

  1. 条件不允许的情况下(不能随意重启计算机)执行下列代码:
1
setsebool -P httpd_can_network_connect 1
  1. 其他情况下, 可以获取root权限,通过root修改/etc/selinux/config
1
2
3
4
5
6
7
8
9
sudo su

vim /etc/selinux/config

SELINUX=enforcing
改为
SELINUX=disabled

重启服务器