I’m a newbie with haproxy and I’m trying to figure out how to do something which seems quite simple. I want to proxy a tomcat context.
For example http://bobsautomotive.com:8080/HelloWorld
Here is my haproxy config:
global
daemon
maxconn 256
log 127.0.0.1 local0
defaults
mode http
option httplog
option logasap
log global
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http-in
bind *:80
default_backend servers
backend servers
balance roundrobin
option redispatch
option httpclose
option forwardfor
cookie JSESSIONID prefix
server one tomcat.bobsautomotive.com:8009 cookie tomcat1 check
stats uri /admin?stats
stats realm haproxy
stats scope .
This works fine to get to the Tomcat main page. But, If I try to change it to use a context like:
server one tomcat.bobsautomotive.com:8009/han cookie tomcat1 check
It won’t work…
Any ideas?
Thanks
No one answered this question, but the answer lies in setting up a default host in tomcat server.xml