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 certificate configuration is handled only on the upstream servers and not in the Nginx server?
Nginx load balance with upstream SSL
nginxssl
Related Topic
- Node.js + Nginx – What now
- Java – Resolving javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed Error
- How to generate a self-signed SSL certificate using OpenSSL
- PHP Framework: Ebay Like Site
- Nginx – Upstream SSL – peer closed connection in SSL handshake
Best Answer
You need to use Upstream module, and Reverse Proxy module. To reverse proxy to the https upstream, use this
where backend is an uptream block.
However, if I were doing this, I'd terminate ssl on the nginx server, and make upstream app servers doing what they are good at: serving the content, instead of worrying about ssl encryption/decryption overhead. Setting up ssl termination on nginx is also very simple using the SSL module. A very good case study is also given here.