Monitor-uri conflicting with default_backend

Haproxy is running v3.0.11 behind an Azure Application Gateway

I have a monitor-uri currently configured with the root path “/”.

When a request comes in with a bogus/non-existent URL (e.g. santosh.abc.com) that does not have any matching ACL or backend, it gets routed to an empty backend_default backend, which it should.

However, since the monitor-uri is configured using the root “/” path, the bogus URL gets a 200 OK response from the haproxy instead of a 503, when the URL is either https://santosh.abc.com OR https://santosh.abc.com**/****
**
FYI - requests like https://santosh.abc.com/xyz or https://santosh.abc.com/test get a proper 503 response.

I understand that configuring root path in health check is not ideal. We realized this quite late and now if we want to change this, we will have to do it in around 200 Azure Application Gateways.

If you could think of an alternate solution or even a workaround to this, it would be of great help. I want keep the option of modifying health probe in Azure APP GW as a last resort.

I am creating this topic on a non-work computer hence unable to send configuration details, however if needed, can do the needful. Thank you.

Your options are move the health check to a different port (different frontend on a different port) or path (monitor-uri).

There are no other options.

Alright. Thank you Lukas.