SSL Pass-Through in Nginx Reverse proxy?

2019-02-09 07:30发布

问题:

Is it possible to use Nginx reverse proxy with SSL Pass-through so that it can pass request to a server who require certificate authentication for client.

It means server will need to have certificate of client server and will not need certificate of Nginx reverse proxy server.

回答1:

Not sure how much it can work in your situation, but newer (1.9.3+) versions of Nginx can pass (encrypted) TLS packets directly to an upstream server, using the stream block :

stream {
  server {
    listen     443;
    proxy_pass backend.example.com:443;
  }
}

Note that it cannot use the server_name directive, for instance (because it essentially operates at the TCP level and knows nothing of TLS) and thus cannot create virtual hosts.



标签: nginx