You are using nginx and trying to call the downstream application but it returns http 502.


The reason could be because SELINUX would have blocked certain port. You can check the logs for more details.


The following example is from a sample repo whereby the downstream application uses port 801 and 802.

  1. Check the ngnix logs — /var/log/ngnix/error.log
    From here you will be able to see the error “permission denied”

2. Check the audit log — /var/log/audit/audit.log

sudo cat /var/log/audit/audit.log | grep nginx | grep denied



Cloud Techies

Onboarding steps, design diagrams, architecture flows, technical solutions and implementations on all major Clouds like AWS, GCP, Azure and details about other important open source tools like Kubernetes, Terraform, Ansible.