Cockpit is not reachable via HAProxy
-
Hi,
I'm struggling trying to access cockpit server using HAProxy as a reverse proxy.
The setup is as follows:Frontend
Bind to <my-ip>:443
Rules:
subdomain1.mydonaim.com -> backend_subdomain1
subdomain2.mydonaim.com -> backend_subdomain2Backends:
backend_subdomain1: 192.168.100:9090
backend_subdomain2: 192.168.100:8080When trying to connect from inside the firewall using IPs:
- 192.168.100.2:9090 -> Works (cockpit)
- 192.168.100.2:8080 -> Works
When trying to connect from inside or outside the firewall using FQDN:
- subdomain1.mydonaim.com -> NOT Work (error 400 - incorrect request)
- subdomain2.mydonaim.com -> Works
Because one always works, I can confirm that firewall rules and firewall settings in my server are correct.
I have tried almost everything, so any clue on what could be the issue will be very appreciated !! -
Well Ok, I resolved it.
The backend for cockpit (port 9090) must be encrypted. And the only acceptable healthcheck is Basic.
Also, once the backend is updated, I had to change its name and reallocate it to the front-end rule with the new name. There must be an issue with the cache.