HAProxy with Authenticated Backend

  • I'm trying to get HA Proxy to connect to a backend that requires authentication. I am receiving a Layer7 wrong status: Bad Request error message. I think I need to do something to structure the http request, but can't figure it out.

    Any thoughts? thanx

  • @BrianVeg
    You might be doing something wrong, but that's hard to tell if you don't tell/show what you did? What configuration options have you tried? Did that change anything in the result?

    Anyhow my current best guess:
    Try changing the health-check method to 'GET' and add a 'version' specification with both a 'host' and a 'accept' header behind it like the example's on the page for that field. Does that change the L7 error to something else?

    If not try a curl request, if that works fine then try and find the difference between what curl sends and what haproxy sends..

  • @PiBa
    Adding HTTP/1.0\r\nHost:\ hostname to http check brought the backend up. The whole chain then worked.

    I needed to add the hostname to the http check to get it to work.

    Thanx for the help.

Log in to reply