Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    HaProxy & lets Encrypt Routing Question

    Scheduled Pinned Locked Moved Cache/Proxy
    2 Posts 2 Posters 957 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cjbujold
      last edited by

      Newbie question,

      We have HaProxy routing all of our http traffic to various servers in the backend.  This has been working properly for some time.

      Now with Let's Encrypt we have created certificates for multiple domains and web sites and want to redirect the http traffic to the https port of HAProxy so that only HTTPS traffic is served.

      In other words if you ask for http:xxx.abc.com or wdc.dfg.com your request will be automatically answered with the equivalent (offLoaded) ssl Https web site.  We want the backend to remain http based but served as https with ssl offloading using let's encrypt.

      We have created the SSL offloading frontend with the equivalent backend but at this point I must be brain dead since I don't see how I can reroute the http traffic to https.

      Any help in this last step would be appreciated.

      Thanks

      1 Reply Last reply Reply Quote 0
      • M
        maverick_slo
        last edited by

        Hi!

        In frontend under advanced config add this to Advanced pass thru:

        redirect scheme https if { hdr(Host) -i host.domain.com } !{ ssl_fc }
        

        That should do it…

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.