I currently am using haproxy to do reverse_proxy on my end.
Unfortunately, I cannot get it to work!.
This is my config:
backend twisted mode http timeout connect 10s timeout server 30s balance roundrobin server apache1 127.0.0.1:11111 weight 1 maxconn 512 backend cometd mode http timeout connect 5s timeout server 5m balance roundrobin server cometd1 127.0.0.1:12345 weight 1 maxconn 10000 frontend http_proxy #arbitrary name for the frontend bind *:80 #all interfaces at port 80 mode http option forwardfor option http-server-close option http-pretend-keepalive default_backend twisted #by default forward the requests to apache acl req_cometd_path path_beg /comet/ use_backend cometd if req_cometd_path acl req_cometd_host hdr_dom(host) -i comet.okiez.com use_backend cometd if req_cometd_host
- If I try to access localhost/comet/test1/test2, haproxy forwards to the cometd backend correctly. However, the request path remains to be /comet/test1/test2, where my comet engine (orbited) doesn't handle the /comet/ part. Is there anyway to tell haproxy to drop the first /comet/ in the requests that gets directed to the cometd backend?
- As you can see, I have acl req_cometd_host hdr_dom(host) -i comet.okiez.com too. This simply stopped working. I don't know if accessing http://comet.localhost/test1/test2 or comet.127.0.0.1/test1/test2 makes any sense at all. How can I write acl req_cometd_host hdr_dom(host) -i to for localhost addresses?