HAProxy redirecting http to https (ssl)

前端 未结 16 1539
你的背包
你的背包 2020-12-22 22:04

I\'m using HAProxy for load balancing and only want my site to support https. Thus, I\'d like to redirect all requests on port 80 to port 443.

How would I do this?<

16条回答
  •  难免孤独
    2020-12-22 23:05

    In newer versions of HAProxy it is recommended to use

    http-request redirect scheme https if !{ ssl_fc }
    

    to redirect http traffic to https.

提交回复
热议问题