Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have following HAProxy configuration:

(...)

frontend mixed
    mode    http
    bind    [PUBLIC IP]:80  
    bind    127.0.0.1:81 # [for https via stunnel]
    bind    [OTHER PUBLIC IP]:80

    option  httplog
    option  dontlognull
    option  httpclose
    maxconn 8000

    # non-ssl api
    acl API hdr_dom(host) -i api.example.com
    use_backend apiserver if API

    default_backend hosted_app

backend hosted_app
    mode http
    balance roundrobin
    server gae ghs.google.com

(...)

My problem is that everything works fine on both public IPs but when I make:

curl 127.0.0.1:81 --header 'Host: client.domain.com'

i get 503 error after a while...

altough this examples works fine:

curl 127.0.0.1:81 --header 'Host: api.example.com'
curl client.domain.com:80

What is wrong?

share|improve this question
    
Did you take a look at the haproxy.log? –  quanta Aug 12 '12 at 16:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.