Hướng dẫn chuyển đổi từ nginx x.509 sang pfx iis năm 2024
Website certificate website.crt Website privatekey website.key Intermediate certificate inter.crt Root CA certificate rootca.crt Show Một số certificate cần cho quá trình cài đặt
Trong một số trường hợp cần cấu hình thêm dhparam.pem ⇒ Tạo ra bằng command sau openssl dhparam -out dhparam.pem 2048 1.cPanel hosting
https://
2.Plesk hosting
https://
3.Web server ApacheCấu hình như sau vào virtualhost https
Cấu hình HSTS Header always set Strict-Transport-Security "max-age=63072000;" Cấu hình HPKP Header Header set Public-Key-Pins "pin-sha256=\"cUPcTAZWKaASuYWhhneDttWpY3oBAkE3h2+soZS7sWs=\"; pin-sha256=\"M8HztCzM3elUxkcjR2S5P4hhyBNf6lHkmjAHKhpGPWE=\"; max-age=5184000; includeSubDomains; report-uri=\"https://www.example.org/hpkp-report\"" 4.Web server NginxCấu hình như sau vào virtualhost https ssl_certificate /etc/ssl/certs/website_inter.crt; ssl_certificate_key /etc/ssl/certs/website.key; Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bitsssl_dhparam /etc/ssl/certs/dhparam.pem; enables server-side protection from BEAST attacks ## http://blog.ivanristic.com/2013/09/is-beast-still-a-threat.htmlssl_prefer_server_ciphers on; disable SSLv3(enabled by default since nginx 0.8.19) since it's less secure then TLS http://en.wikipedia.org/wiki/Secure_Sockets_LayerSSL_3.0ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ciphers chosen for forward secrecy and compatibility ## http://blog.ivanristic.com/2013/08/configuring-apache-nginx-and-openssl-for-forward-secrecy.htmlssl_ciphers HIGH:!aNULL:!MD5; # avoid weak ciphersuite enable session resumption to improve https performance ## http://vincent.bernat.im/en/blog/2011-ssl-session-reuse-rfc5077.htmlssl_session_cache shared:SSL:50m; ssl_session_timeout 1d; ssl_session_tickets off; enable ocsp stapling (mechanism by which a site can convey certificate revocation information to visitors in a privacy-preserving, scalable manner)http://blog.mozilla.org/security/2013/07/29/ocsp-stapling-in-firefox/resolver 8.8.8.8 8.8.4.4; ssl_stapling on; ssl_stapling_verify on; ssl_trusted_certificate /etc/nginx/ssl/website_inter.crt; config to enable HSTS(HTTP Strict Transport Security) https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Securityto avoid ssl stripping https://en.wikipedia.org/wiki/SSL_strippingSSL_strippingalso https://hstspreload.org/add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; 5.Ứng dụng nền tảng JavaTham khảo Hướng dẫn cài đặt SSL cho server Java (keystore) Windows IISTạo certificate PFX openssl pkcs12 -export -in website.crt -inkey website.key -chain -CAfile chain.crt -name "domain" -out website.pfx Hoặc openssl pkcs12 -export -out name.pfx -inkey key.key -in key.crt -certfile ev.crt -passout pass:tenten Chú ý:
Chuyển đổi từ *.PEM (khi sử dụng SSL Let’s Enscypt) sang PFX openssl pkcs12 -export -out certificate-full.pfx -inkey privkey1.pem -in cert1.pem -certfile fullchain1.pem Script tự động gen PFX: (Với GlobalSign) https:// 0 Chú ý:
Import vào server
Cấu hình website https
6.ZimbraTham khảo Cấu hình SSL certificate cho Zimbra OpenSSL helpXem thông tin certificate https:// 1 Xem thông tin CSR https:// 2 Generate private key kèm theo CSR https:// 3 Generate key kèm theo self-signed certificate https:// 4 Generate CSR từ private đã có https:// 5 Bỏ mật khẩu của private key https:// 6 Convert PKCS7 ⇒ PEM https:// 7 Convert PFX ⇒ PEM https:// 8 Kiểm tra hash MD5 của certificate, CSR hoặc private key https:// 9 Lấy encode Base64 của pubkey Dùng cho cấu hình HPKP Header (Public-Key-Pins) Sử dụng một trong 4 lệnh sau, tùy thuộc thông tin input là pubkey, CSR, hay privatekey (ECC hoặc RSA) |