title: Apache webserver not able to connect to Tomcat server
body: <p>I have configured Apache Httpd and Tomcat on my local system, by referring to this tutorial: <a href="http://www.tutorialspoint.com/white-papers/load-balancing-and-scalability-via-tomcat-clusters.htm" rel="nofollow">http://www.tutorialspoint.com/white-papers/load-balancing-and-scalability-via-tomcat-clusters.htm</a>. I was trying to achive load balancing, but the connection between the webserver and the Tomcat server does not work:</p>
  
  <p>In <code>workers.properties</code> file</p>
  
  <pre><code>workers.tomcat_home=D:/Installed/apache-tomcat-7.0.62
  workers.java_home=C:/Program Files/Java/jdk1.6.0_45
  worker.list=worker1
  worker.worker1.port=8009
  worker.worker1.host=localhost
  worker.worker1.type=ajp13
  worker.worker1.lbfactor=1
  </code></pre>
  
  <p>In <code>httpd.conf</code> file</p>
  
  <pre><code># Path to workers.properties
  JkWorkersFile D:/Installed/Apache24/conf/workers.properties
  # Path to jk logs
  JkLogFile D:/Installed/Apache24/logs/mod_jk.log
  # Jk log level [debug/error/info]
  JkLogLevel info
  # Jk log format
  JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
  # JkOptions for forwarding
  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
  # JkRequestLogFormat set the request format
  JkRequestLogFormat "%w %V %T"
  JkMount /BalServers worker1
  JkMount /BalServers/* worker1
  </code></pre>
  
  <p>I have placed <code>mod_jk.so</code> file in modules folder.</p>
  
  <p>My webserver is started and running (have tried with <code><a href="http://localhost" rel="nofollow">http://localhost</a></code> URL, which shows me Apache home page). Tomcat server also works and is able to fetch <code><a href="http://localhost:8080/BalServers/" rel="nofollow">http://localhost:8080/BalServers/</a></code> URL. But when I try <code><a href="http://localhost/BalServers/" rel="nofollow">http://localhost/BalServers/</a></code> URL, nothing is showing up, not even 404 status page.</p>
  
  <p>Please let me know is any other configurations required?</p>
  
  <p>Here is my <code>server.xml</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Server port="8005" shutdown="SHUTDOWN"&gt;
    &lt;Listener className="org.apache.catalina.startup.VersionLoggerListener"/&gt;
    &lt;Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/&gt;
    &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
   &lt;Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/&gt;
    &lt;Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
    &lt;Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/&gt;
  &lt;GlobalNamingResources&gt;
      &lt;Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/&gt;
    &lt;/GlobalNamingResources&gt;
    &lt;Service name="Catalina"&gt;
      &lt;Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/&gt;
  
      &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/&gt;
  
       &lt;Engine jvmRoute="worker1" defaultHost="localhost" name="Catalina"&gt;
  
        &lt;Realm className="org.apache.catalina.realm.LockOutRealm"&gt;
          &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/&gt;
        &lt;/Realm&gt;
        &lt;Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"&gt;
          &lt;Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &amp;quot;%r&amp;quot; %s %b" prefix="localhost_access_log." suffix=".txt"/&gt;
        &lt;/Host&gt;
      &lt;/Engine&gt;
    &lt;/Service&gt;
  &lt;/Server&gt;
  </code></pre>