apache - ProxyPass, ProxyReverse vs AJP -


There is currently a Tommack + Apache HTTP server setting to serve my Java servlet:

  ProxyPass / myservice http: // localhost: 8080 / myservice ProxyPassRerverse / myservice http: // localhost: 8080 / myservice  

except for all of these myservice OK to know the client's IP address, which always goes out of 127.0.0.1 due to the proxy. What is the solution to finding a real IP address? Is AJP an option?

  doGet (HttpServletRequest request, HttpServletResponse response) {request.getRemoteAddr ()}  

Like it:

In Apache config:

  & lt; Location / Foo & gt; ProxyPass ajp: // localhost: 8009 / foo proxy pathway rss: // localhost: 800 9 / afu & lt; / Location & gt;  

and then in your server.xml:

  & lt; Connector port = "8009" enableLookups = "false" safe = "true" URIEncoding = "UTF-8" tomac attestation = "first" protocol = "AJP / 1.3" />  

It passes everything, passes AJP protocol information, but http: does not.

You may not want to be secure = "true", I use it because SSL is controlled on the Apache layer and I need to know that the connection should be considered a safe .


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -