I need to take a note on this right now.
sudo setsebool -P httpd_can_network_connect true
I’m letting nginx route different name pointing to the same IP address to each different port, but I was getting bad request (502). The command above solved the problem.