0

I have a load balancing cluster set up with Apache 2.2 and Tomcat 7 nodes. I know clients wouldn't normally know the IP of the nodes, but I'm curious if there is a way to configure the nodes to redirect requests to the load balancer. Part of this already works, for example the url:

Request 1) https://<node-ip>/webapp

results in:

https://<lb-ip>/webapp

This is good.

But I get a 403 response if I specify any other url, such as:

Request 2) https://<node-ip>/webapp/  <-- note the extra slash

Is there a way to make Request 2 redirect to the load balancer?

user1394451
  • 93
  • 1
  • 3

1 Answers1

0

Shouldn't you access the URL of your load balancer, insted of your nodes? The LB is then redirecting to your nodes and back. An AJP mapping normally looks like this:

JkMount /YouApp       balancer
JkMount /YouApp/*     balancer
Stefan
  • 12,108
  • 5
  • 47
  • 66
  • I'm in agreement that the URL of the load balancer should be used. But my question is can I configure what the nodes do if they are accessed directly (for whatever reason). The fact that there is a partial solution is tantalizing. – user1394451 Feb 25 '14 at 18:18
  • To avoid them being accessed directly you can turn off the Coyote web server in Tomcat. Just comment out the connector using protocol="HTTP/1.1" in server.xml. – Stefan Feb 26 '14 at 09:14