以下是Debian Nginx常見SSL錯誤的解決方法:
檢查證書配置
sudo chown www-data:www-data /etc/nginx/ssl/*.crt
sudo chmod 600 /etc/nginx/ssl/*.key
openssl x509 -noout -modulus -in cert.crt | openssl md5
openssl rsa -noout -modulus -in key.key | openssl md5
檢查Nginx配置
ssl_certificate
、ssl_certificate_key
路徑正確,語法無誤:sudo nginx -t
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'HIGH:!aNULL:!MD5';
排查服務與環境問題
sudo netstat -tuln | grep 443
sudo ufw allow 443/tcp
sudo systemctl restart nginx
查看日志定位問題
sudo tail -f /var/log/nginx/error.log
其他高級問題
ssl_client_certificate
。nginx -V
查看是否包含--with-http_ssl_module
)。若問題仍未解決,可結合錯誤日志中的具體信息進一步排查,或參考Nginx官方文檔。