Thursday, July 23, 2009

Apache mod_proxy and tomcat

If you use apache to forward request to a local running tomcat, you may encounter this error message in the error.log:

[error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed


If you have SELinux running you have to check if it allows local connections, by running:



getsebool -a | grep httpd


you have to check that the following is written:



httpd_can_network_connect –> on


if it is off, you have to enable it:



setsebool -P httpd_can_network_connect=1


and restart your apache.



This tip has been taken from: http://swapyourbooks.com/welcome/knowledgebase/misc/selinux-allow-httpd-tomcat-proxy.html