今天遇到nginx NSS error -12263 (SSL_ERROR_RX_RECORD_TOO_LONG) 处理,简单记录一下:
- 端口要配置为支持ssl
- 不能同时ssl on及 listen port ssl
You can’t have both listen 443 ssl; and ssl on;, remove the ssl on; line and restart nginx.
# HTTPS server
#
server {
listen 443 ssl;
server_name welcome.com;
root html;
index index.html index.htm;
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_session_timeout 5m;
}