解决nginx访问问题connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream,
问题:搭建好项目之后,用nginx进行代理,进行日常配置之后,发现前端正常访问,但是后端访问出现错误,报502错误,查找nginx日志,发现connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream,有这个错误。网上查阅得知是selinux没有关闭。
解决步骤:
关闭selinux
[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
[root@localhost ~]# sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config
网上还有一种说法,在此记录下。执行下面的命令
setsebool -P httpd_can_network_connect
解决nginx访问问题connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream,的更多相关文章
- 解决nginx下connect() to 127.0.0.1:3000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: 错误信息
尝试搭建nginx负载均衡,做域名转发时报如上错误,困扰了好长时间还好没放弃,还好百度找到解决办法: 是SeLinux导致: 1.执行下面的命令 setsebool -P httpd_can_netw ...
- Nginx: 解决connect() to xxxx failed (13: Permission denied) while connecting to upstream的问题
一句话:setsebool httpd_can_network_connect true
- 解决Nginx的connect() to 127.0.0.1:8080 failed (13: Permission denied) while connect
在进行Nginx+Tomcat 负载均衡的时候遇到了这个权限问题,在error.log日志中.我们能够看到例如以下: connect() to 127.0.0.1:8080 failed (13: P ...
- php fpm安装curl后,nginx出现connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied)的错误
这里选择直接apt-get安装,因为比起自己编译简单多了,不需要自己配置什么 #sudo apt-get install curl libcurl3 libcurl3-dev php5-curl 安装 ...
- Centos 7 上使用nginx为Node.js配置反向代理时错误:(13: Permission denied) while connecting to upstream
错误来源:Centos 7 上使用nginx为Node.js配置反向代理时产生(13: Permission denied) while connecting to upstream的错误 nginx ...
- 解决Nginx的13: Permission denied) while connecting to upstream
一.问题 做Nginx负载的时候,经常遇到这样的情况: // :: [crit] #: * connect() to failed (: Permission denied) while connec ...
- nginx 502错 failed (13: Permission denied)
安装nginx和php-fpm之后出现502错误 找了个理由说php-fpm不启动 ,但在我的实践中,该过程开始 找了半天没找到病因.视图nginx记录后 我发现下面的错误 [crit] 2686#0 ...
- 解决nginx报错:nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied)
报错描述: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) 通过ansible远程给主机更换端口并重新启动ng ...
- 解决Mac nginx问题 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
brew services restart nginx Stopping nginx... (might take a while) ==> Successfully stopped nginx ...
随机推荐
- Hbase和Hive的异同
共同点:1.hbase与hive都是架构在hadoop之上的.都是用hadoop作为底层存储 区别:2.Hive是建立在Hadoop之上为了减少MapReduce jobs编写工作的批处理系统,HBa ...
- D3_book 11.1 pie
<!-- pie example --> <!DOCTYPE html> <meta charset="utf-8"> <style> ...
- Difference between the Bill of distribution and sourcing rule.
https://forums.oracle.com/thread/936768 This is from a users guide Oracle Supply Chain Planning ...
- [Openwrt 项目开发笔记]:MySQL配置(六)
[Openwrt项目开发笔记]系列文章传送门:http://www.cnblogs.com/double-win/p/3888399.html 正文: 在本人的项目中,运行在路由器上的服务器采用Ngi ...
- [Openwrt 项目开发笔记]:DDNS设置(五)
[Openwrt项目开发笔记]系列文章传送门:http://www.cnblogs.com/double-win/p/3888399.html 正文: 在上一节中,我主要讲述了如何在Openwrt上安 ...
- 世界各国货币,C#数字货币计算
货币 CCY(Currency)本质上是一种所有者与市场关于交换权的契约,根本上是所有者相互之间的约定.吾以吾之所有予市场,换吾之所需,货币就是这一过程的约定,它反映的是个体与社会的经济协作关系.货币 ...
- day52 进程与守护进程
http://www.cnblogs.com/Eva-J/articles/8253549.html 博客参考. 多进程聊天 守护进程. 多进程 1.Unix/Linux:fork()调用实现多进程. ...
- Day 30 面向对象的考试题
-摘自张磊同学博客. 面向对象 1.请简述类.对象.实例化.实例这些名词的含义: #类 : 是对具有相同属性和相似行为的一类事物的抽象 #对象: 是一个具有具体属性值的类的实例化 #实例化 : 从一个 ...
- H - The LCIS on the Tree HDU - 4718
The LCIS on the Tree Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Oth ...
- 1000. Minimum Cost to Merge Stones
There are N piles of stones arranged in a row. The i-th pile has stones[i] stones. A move consists ...