HAProxy redirecting http to https (ssl)

前端 未结 16 1449
你的背包
你的背包 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:06

    Simply:

    frontend incoming_requsts
            bind *:80
            bind *:443 ssl crt *path_to_cert*.**pem**
            **http-request redirect scheme https unless { ssl_fc }**
            default_backend k8s_nodes
    

提交回复
热议问题