OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: cclloyd on December 14, 2020, 03:52:47 am

Title: Prevent Host Rewrite with HAProxy
Post by: cclloyd on December 14, 2020, 03:52:47 am
I have a FreeIPA server setup to manage lan.example.com.  I want to be able to access the web UI on ipa.example.com with ACME certs, so I set up HAProxy to do so.

Real server: ipa1 ipa-server1.lan.example.com:443

Backend: ipa1

Frontend: listen ipa.example.com:443

And it works... somewhat.  It does properly redirect to the backend.  But it seems to be getting rewritten to the lan.example.com host.

Ex, when I visit it, the URL changes from ipa.example.com to ipa-server1.lan.example.com/ipa/ui/.

How can I prevent that host rewrite so that it stays as ipa.example.com?  When it redirects it also prevents using the proper SSL certificate because its connecting directly to the backend now.