Best way to redirect HTTP to HTTPS
Actually i have un network with a pfsense
i use HAProxy for reverse proxy, in my DMZ i have more than physical server
one HASSIO for my domotic -----> https:/home.mydomain.local
one Cloud / Mail for e ---- https://cloud.mydomain.local.
To go on SSL url, i configure a frontend to redirect all http to https.
but in my apache config files i have redirect http to https,
it's redundant No.
What's the best way or the standart lets do Haproxy or my apache conf ?
How clients from the internet communicate with the reverse proxy frontends and how they in turn communicate with the backends are two separate things.
Seeing as your reverse proxy is the "point-of-entry" to your local network from the outside world I would definitely leave the http→https redirect in HAProxy.
I am not clued up about Apache but as far as I understand you can decide if you want HAProxy to use http or https to talk with the it.... that's totally up to you if you want that additional redirect.
I configured my HAProxy to communicate over http with almost all of my backends because I want the fastest possible speed inside my local network and I let the https shared frontend take care of the SSL encryption.
@orionis Any feedback?