如何设置 pfSense haproxy http 到 https 重定向
设置 HAProxy HTTP 到 HTTPS 重定向非常简单:
- 设置一个新的主前端。我通常将其命名为
HTTP-to-HTTPS,但你可以随意命名 - 配置外部地址部分以在你要重定向的所有接口上监听端口
80。注意你需要从所有其他主前端删除所有端口 80 监听地址,否则你将无法重新加载 haproxy

- 现在创建一个 ACL
http-request redirect规则,以scheme https作为规则:

这会将此前端上的任何传入请求重定向到 HTTPS。由于此前端只监听 HTTP,它会将所有 HTTP 请求重定向到 HTTPS。
Check out similar posts by category:
Networking
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow