Hi,

Please read the article below:
http://blog.exceliance.fr/2011/09/28/aloha-load-balancer-as-a-reverse-proxy/
And focus on the frontend section, you may find the big picture of how
to achieve what you want.

Then, read haproxy doc to find the right ACL for your needs.

Baptiste


On Sat, Apr 27, 2013 at 8:57 PM, S Ahmed <[email protected]> wrote:
>
> I want to use haproxy for a website, the website has 2 different sets of
> servers.
>
> #1.  website: www.example.com or example.com
>
>    server#1  1.2.3.4:8085
>
>    server#2  1.2.3.5:8085
>
> #2.  api.example.com
>
>    server#3  1.2.3.6:8091
>
>    server#4  1.2.3.7:8091
>
>
>
> What will my haproxy config look like?  I have pasted a sample from your
> docs below, but unsure how to distiguish between the 2 types of url requests
> based on the URL pattern.
>
>    global
>
>         daemon
>         maxconn 256
>
>     defaults
>         mode http
>         timeout connect 5000ms
>         timeout client 50000ms
>         timeout server 50000ms
>
>     frontend http-in
>         bind *:80
>         default_backend servers
>
>     backend servers
>         server server1 127.0.0.1:8000 maxconn 32

Reply via email to