I have a Wt wthttpd Server running two threads or instances of the server,
I want each URL to be on its own backend, and will have other URLs in this
same configuration;
I just keep it simple here with one running two threads; but how do I do
this?
This link shows the basic setup for Wt wthttpd
http://redmine.webtoolkit.eu/projects/1/wiki/Using_HAProxy_as_a_reverse_proxy
As you can see it creates the thread using a Prefix, so I want to attach
the URL to this Prefix.
I tried to AND the two like this:
acl is_domain_com_0 hdr_end(host) -i domain.com
use_backend domain_com_be_0 if is_domain_com_0 AND url_sub wtd=wt-8080
This is the warning I get
[ALERT] 146/224731 (4249) : parsing [/etc/haproxy/haproxy.cfg:30] : error
detected while parsing switching rule.
where line 30 is this line:
use_backend domain_com_be_0 if is_domain_com_0 AND url_sub wtd=wt-8080
----------------------------
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
user haproxy
group haproxy
daemon
defaults
log global
mode http
option httplog
option dontlognull
option http-server-close
option http-pretend-keepalive
option forwardfor
option originalto
retries 3
option redispatch
maxconn 2048
contimeout 5000
clitimeout 50000
srvtimeout 50000
frontend wt
bind 123.123.123.123:80
redirect prefix http://domain.com code 301 if { hdr(host) -i
www.domain.com }
acl is_domain_com_0 hdr_end(host) -i domain.com
acl domain_com_0_up nbsrv(domain_com_be_0) gt 0
use_backend domain_com_be_0 if is_domain_com_0 AND url_sub
wtd=wt-8080
acl is_domain_com_1 hdr_end(host) -i domain.com
acl domain_com_1_up nbsrv(domain_com_be_1) gt 0
use_backend domain_com_be_1 if is_domain_com_1 AND url_sub
wtd=wt-8081
default_backend domain_com_lb
backend domain_com_lb
balance roundrobin
server ServerThread-0 123.123.123.123:8080 track
domain_com_be_0/ServerThread-0
server ServerThread-1 123.123.123.123:8081 track
domain_com_be_1/ServerThread-1
backend domain_com_be_0
balance roundrobin
server ServerThread-0 123.123.123.123:8080 check
backend domain_com_be_1
balance roundrobin
server ServerThread-1 123.123.123.123:8081 check
-------------------------------------------
Jeff Flesher
Disabled Gulf War Vet