HAProxy Backends to .local addresses

Hi, I am trying to configure an haproxy setup I have to be able to forward traffic to start9 services, in this way I can have my LAN domains and certificates to be used instead of .local and mDNS (since I always have problems with them).

So basically the idea is to use a backend configuration that sets the Host header to be the .local address of the start9 service I want to access (so that I don’t need mDNS support and the avahi stuff), the problem is that I always end up on the start9 login screen.

This are two example configurations I tried:

backend mempool_1
    mode http
    option forwardfor
    http-request set-header Host REDACTED.local
    server mempool 192.168.1.X:443 check ssl verify none

backend mempool_2
    mode http
    http-send-name-header Host
    server REDACTED.local 192.168.1.X:443 check ssl verify none

As I understand, connecting with the right Host header should be enough, but while troubleshooting I came across two different curl commands with two different outputs:

  • this is working and I can see the mempool html: curl -svk --resolve REDACTED.local:443:192.168.1.X https://REDACTED.local
  • this is NOT working and I end up on the start9 login screen: curl -svk -H "Host: REDACTED.local" https://192.168.1.X:443

So I was wondering what is the correct way to set haproxy to have the same behaviour of the first curl command? Was anyone here able to setup haproxy to work with start9 .local services?

Thanks.