Apache unable to connect ajp jboss centos

If you are connecting to AJP using non standard port other that 8009. Two jboss instances on same centos machine. You need to set the following property to true for Apache to connect to AJP on AJP/1.3 port

httpd_can_network_connect --> off

Use command

setsebool -P httpd_can_network_connect=1

getsebool -a | grep httpd

httpd_can_network_connect --> on

Enjoy

Fix for below Error

[Fri Oct 12 16:31:41 2012][12652:140657718081504] [info] ajp_service::jk_ajp_common.c (2623): (worker2) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)

[Fri Oct 12 16:31:41 2012][12652:140657718081504] [info] jk_open_socket::jk_connect.c (627): connect to 127.0.0.1:8010 failed (errno=13)

[Fri Oct 12 16:31:41 2012][12652:140657718081504] [info] ajp_connect_to_endpoint::jk_ajp_common.c (995): Failed opening socket to (127.0.0.1:8010) (errno=13)

[Fri Oct 12 16:31:41 2012][12652:140657718081504] [error] ajp_send_request::jk_ajp_common.c (1630): (worker2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=13)