Hi Jeff,

No worries about the ML :)

I'm happy I could help you.

Baptiste


On Tue, May 28, 2013 at 8:45 AM, Jeff Flesher
<[email protected]> wrote:
> New to list, I take it I should have done a reply to all and make sure
> haproxy is in the list; I should remember this is a list, thanks.
>
> That did it; thanks, I just needed to restart monit; nothing to do with
> haproxy; my wthttpd service stopped; I understand what I did wrong; the last
> example works.
>
>
> On Mon, May 27, 2013 at 11:24 PM, Baptiste <[email protected]> wrote:
>>
>> hi Jeff,
>>
>> Please keep the ML in Cc, so everybody can benefit of the resolution.
>>
>> HAProxy returns a 503 when there is no server available in the farm.
>> Please turn on haproxy stat socket and check the server status on it:
>> it should be UP, but I guess it is DOWN for now.
>>
>> Baptiste
>>
>>
>> On Tue, May 28, 2013 at 8:20 AM, Jeff Flesher
>> <[email protected]> wrote:
>> > I got to thinking about what you said about AND being implicit; I
>> > understand
>> > that now, so I rewrote it to evaluate it, its clear now that I have to
>> > do
>> > this, so the AND would make sense, but this seems to run, at least the
>> > service started:
>> >         acl is_sub_domain_com_0 url_sub wt-8080
>> >         use_backend domain_com_be_0 if is_domain_com_0
>> > is_sub_domain_com_0
>> > This code runs; but I get the Error:
>> > 503 Service Unavailable
>> > I can pull up the site with the port number 8080 or 8081;
>> > I am new to haproxy; but its clear I need to setup logging so I can
>> > figure
>> > out why the 503; but can you tell me if I am doing this right now?
>> >
>> > Here is my new plan; but as I stated, I get 503 Blues; now I need to
>> > learn
>> > about logging...
>> >
>> > ***********
>> >
>> > 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
>> >         acl is_sub_domain_com_0 url_sub wt-8080
>> >         use_backend domain_com_be_0 if is_domain_com_0
>> > is_sub_domain_com_0
>> > domain_com_0_up
>> >
>> >
>> >         acl is_domain_com_1 hdr_end(host) -i domain.com
>> >         acl domain_com_1_up nbsrv(domain_com_be_1) gt 0
>> >         acl is_sub_domain_com_1 url_sub wt-8081
>> >         use_backend domain_com_be_1 if is_domain_com_1
>> > is_sub_domain_com_1
>> > domain_com_1_up
>> >
>> >
>> >         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
>> > ***********
>> >
>> >
>> > On Mon, May 27, 2013 at 9:45 PM, Baptiste <[email protected]> wrote:
>> >>
>> >> Hi Jeff,
>> >>
>> >> AND is implicit between ACLs.
>> >> No need to precise it. Please give a try to your configuration without
>> >> this unknown keyword and it may works.
>> >>
>> >> Baptiste
>> >>
>> >>
>> >> On Tue, May 28, 2013 at 5:18 AM, Jeff Flesher
>> >> <[email protected]> wrote:
>> >> > 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
>> >
>> >
>> >
>> >
>> > --
>> > Jeff Flesher
>> > Disabled Gulf War Vet
>
>
>
>
> --
> Jeff Flesher
> Disabled Gulf War Vet

Reply via email to