HAProxy with Multiple URL requests


#1

Not the best title but I can explain.

We currently host a product that is running on 6 Windows Servers load balanced with the built-in NLB. We host a main site, example.domain.com for demoing.

Then we have 100s of DNS entries for multiple clients, for example.

example1.domain.com
example2.domain.com
example3.domain.com

Our backend code then takes the URL requested (example1 for instance) and uses that to give each client their specific style sheet to fit their requests.

My problem is example.domain.com works fine but all other URLs gives 404 error. here is my config:

frontend Webroot04-Frontend
bind 10.181.130.48:80
maxconn 50000
mode http
default_backend webroot04

backend webroot04
balance roundrobin
mode http
option forwardfor
server webroot04-01 10.181.130.77:80 check fall 3 rise 5 inter 2000 weight 10
server webroot04-02 10.181.130.78:80 check fall 3 rise 5 inter 2000 weight 10
server webroot04-03 10.181.130.79:80 check fall 3 rise 5 inter 2000 weight 10
server webroot04-04 10.181.130.80:80 check fall 3 rise 5 inter 2000 weight 10

Any suggestions would be greatly appreciated.


#2

Why your backend respnds with 404 errors is a though one to analyze from the haproxy standpoint.

Why don’t you check you backend logs and tell us what the backends need - but doesn’t get from haproxy?