Nginx load balance with upstream SSL

前端 未结 3 1125
庸人自扰
庸人自扰 2020-12-14 10:20

Trying to setup Nginx as load balancer for https servers. The upstream serves over port 443 with SSL certificates configured. How to configure Nginx, so that the SSL certifi

3条回答
  •  醉酒成梦
    2020-12-14 11:18

    As far as I understood from reading relevant discussion on Nginx forum, this is not possible because Nginx needs to terminate upstream SSL connection anyway. If you insist on using Nginx you're left only to replicate SSL configuration and make certificates and key available to Nginx.

    The discussion I linked concluded that HAProxy is much better tool for SSL upstream passthrough. Here's relevant post I've found about configuring HAProxy for such purpose. Because I have zero HAProxy experience I can't summarise its configuration or general viability of the solution leaving it to the reader.

    Update

    Since 1.9.2 Nginx supports HAProxy's proxy protocol.

提交回复
热议问题