I came across a permission denied error when setting up an apache reverse proxy to tomcat on Centos. Tomcat responded correctly from the server itself when wgettting to localhost, but with an external web browser a 503 was coming up. It turns out the problem is with SELinux config … the problem can be fixed by doing a :

setsebool -P httpd_can_network_connect 1