• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

HAProxy with Authenticated Backend

Scheduled Pinned Locked Moved Cache/Proxy
3 Posts 2 Posters 739 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    BrianVeg
    last edited by Oct 9, 2020, 9:51 PM

    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

    P 1 Reply Last reply Oct 10, 2020, 2:14 PM Reply Quote 0
    • P
      PiBa @BrianVeg
      last edited by PiBa Oct 10, 2020, 2:14 PM Oct 10, 2020, 2:14 PM

      @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..

      1 Reply Last reply Reply Quote 0
      • B
        BrianVeg
        last edited by Oct 11, 2020, 11:57 PM

        @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.

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received