Wednesday, July 22, 2015

linux - Can I use apache http server as forwarder to Tomcat?



I have a Tomcat server that listens in 8080(http), 443(https), 7443(https). Note that the connectors for 443 and 7443 use different certificates.
I am interested in using httpd for load balancing.
Is it possible to configure httd so that it simply forwards the requests to Tomcat without needing to install any certificate to httpd itself. I.e. not act as a proxy but as forwarder?
So the SSL end to end is handled by Tomcat.


Answer



No, Apache isn't capable of being a TCP load balancer; it always expects to handle HTTP requests.



For the behavior you want, take a look at HAProxy instead; it can load balance those TCP connections without being involved in the SSL layer.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...