title: Httpd returning 503 Service Unavailable with mod_proxy for Tomcat 8
body: <p>I'm trying to integrate Tomcat with Apache. My aim is to redirect all the requests with
  <code>http://localhost/myapp</code> to <code>http://localhost:8080</code></p>
  
  <p>I followed this guide: <a href="http://tomcat.apache.org/tomcat-8.0-doc/proxy-howto.html">http://tomcat.apache.org/tomcat-8.0-doc/proxy-howto.html</a></p>
  
  <p>My <code>httpd.conf</code> looks like this:</p>
  
  <pre><code>Include conf.modules.d/*.conf
  LoadModule proxy_module  modules/mod_proxy.so
  
  ProxyPass         /myapp  http://localhost:8080 retry=0 timeout=5
  ProxyPassReverse  /myapp  http://localhost:8080
  </code></pre>
  
  <p>My server.xml in apache-tomcat looks like this:</p>
  
  <pre><code>&lt;Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" proxyPort="80" /&gt;
  </code></pre>
  
  <p>Now when I try the url <code>http://localhost/myapp</code>, it gives <code>503 Service Unavailable</code> error.</p>
  
  <p>Both Tomcat and Apache are up and running. The URL <code>http://localhost:8080</code> works fine. </p>
  
  <p>Can there be an issue with file permissions?</p>
  
  <p>For <code>tomcat</code> the user and group are <code>root/root</code> and for <code>httpd</code>, the user and group are <code>apache/apache</code></p>
  
  <p>Am I missing something or am I doing it wrong?</p>
  
  <p>Httpd version is 2.4.6 and Tomcat's version is 8.0</p>
  
  <p>The httpd error logs:</p>
  
  <pre><code>[proxy:error] [pid 19905] (13)Permission denied: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
  
  [proxy:error] [pid 19905] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 0s
  
  [proxy_http:error] [pid 19905] [client ::1:51615] AH01114: HTTP: failed to make connection to backend: localhost
  </code></pre>
  
  <p><strong>Solved!</strong></p>
  
  <p>The answer is here: <a href="http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/">http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/</a></p>