如果客户将选择过期的证书,则Nginx服务器将显示内置错误页面.
<html>
<head><title>400 The SSL certificate error</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The SSL certificate error</center>
<hr><center>Nginx</center>
</body>
</html>
解决方法:
请参考http://nginx.org/en/docs/http/ngx_http_ssl_module.html#errors
server {
...
error_page 495 496 497 https://www.google.com;
...
}
因此,未能提交有效证书的用户将重定向到google.com.当ssl_verify_client设置为on或optional时,这将起作用.
另一种方法仅在$ssl_verify_client设置为可选时才有效,您可以使用$ssl_client_verify进行重定向.
if ($ssl_client_verify = NONE) {
return 303 https://www.google.com;
}
当$ssl_verify_client设置为on时,它将无法工作.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。