title: ProxyPass, ProxyReverse vs AJP
body: <p>I currently have a Tomcat + Apache HTTP server setting to serve my Java servlet:</p>
  
  <pre><code>ProxyPass /myservice http://localhost:8080/myservice
  ProxyPassRerverse /myservice http://localhost:8080/myservice
  </code></pre>
  
  <p>This is all fine except that <code>myservice</code> needs to know the client IP address, which always turns out to be 127.0.0.1 due to the proxy. Is there a solution to get the real IP address? Is AJP an option?</p>
  
  <pre><code>doGet(HttpServletRequest request, HttpServletResponse response){
      request.getRemoteAddr()
  }
  </code></pre>