nginx+tomcat环境下,想通过nginx反向代理配置访问 http://IP:8080,tomcat的欢迎界面

出现的错误:
发现界面出现502,

Nginx 反向代理tomcat 提示502的解决办法
到 /var/log/nginx 下查看nginx报错日志

 

*140 connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream, client: 100.100.100.12, server: 100.100.100.130, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "100.100.100.130"

 
解决办法:
是执行以下语句关闭SeLinux就行。

[[email protected] nginx]# setsebool -P httpd_can_network_connect 1
[[email protected] nginx]#

 

访问正常:

 

Nginx 反向代理tomcat 提示502的解决办法

相关文章:

  • 2022-12-23
  • 2021-12-12
  • 2021-10-07
  • 2022-01-25
  • 2021-07-13
  • 2022-01-15
  • 2021-09-26
  • 2022-01-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-10-17
  • 2021-10-25
  • 2022-12-23
相关资源
相似解决方案