OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 20.7 Legacy Series »
  • Prevent Host Rewrite with HAProxy
« previous next »
  • Print
Pages: [1]

Author Topic: Prevent Host Rewrite with HAProxy  (Read 1119 times)

cclloyd

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
    • View Profile
Prevent Host Rewrite with HAProxy
« 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.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 20.7 Legacy Series »
  • Prevent Host Rewrite with HAProxy
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2