nginx支持ssl双向认证配置

时间:2022-12-03 09:24:14

nginx支持ssl双向认证配置

        listen      443;
server_name test.com; ssl on;
ssl_certificate server.crt; //server端公钥
ssl_certificate_key server.key; //server端私钥
ssl_client_certificate client.crt; //client端公钥
ssl_session_timeout 5m;
ssl_verify_client on; //开启client验证

相关参考

http://wiki.nginx.org/HttpSslModule#ssl