[Linux]Nginx转发Tomcat 502错误


nginx能收到80请求,但是无法转到tomcat:8080.
查看/var/log/nginx/error.log
2015/04/01 11:38:13 [crit] 2895#0: *10 connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream, client: 10.12.70.206, server: localhost:8080, request: "GET /bpp HTTP/1.1", upstream: "http://127.0.0.1:8080/app", host: "10.11.202.204"
解决方案:

I was able to find a solution after 2 days of searching. Somehow SELinux was not permitting Nginx to proxy to my server. Running the command below fixed the issue.

-P permanent的意思

 /usr/sbin/setsebool -P httpd_can_network_connect true 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM