Untuk menginstal sertifikat SSL di VPS (misalnya untuk Nginx atau Apache), kamu perlu menggabungkan atau menyusun urutan file .crt
dengan benar, lalu mengarahkannya di konfigurasi web server.
Kamu punya:
-
file_single.crt
→ Server Certificate (utama) -
DigiCertCA.crt
→ Intermediate Certificate -
TrustedRoot.crt
→ Root Certificate
✅ Cara Install SSL Certificate di VPS (misal Nginx/Apache)
🛠️ Langkah 1: Gabungkan File .crt
Gabungkan sertifikat dalam urutan yang benar menjadi satu file .pem
atau .crt
:
cat file_single.crt DigiCertCA.crt TrustedRoot.crt > fullchain.pem
Urutan penting:
- Sertifikat domain kamu (file_single.crt)
- Intermediate (DigiCertCA.crt)
- Root (TrustedRoot.crt)
🛠️ Langkah 2: Simpan Key & Fullchain
Pastikan kamu juga punya file private key, misalnya private.key
🛠️ Langkah 3: Konfigurasi Web Server
🔹 Untuk Nginx:
server {
listen 443 ssl;
server_name domainnya.go.id;
ssl_certificate /etc/ssl/fullchain.pem;
ssl_certificate_key /etc/ssl/private.key;
# Optional: Security settings
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
}
🔹 Untuk Apache:
biasa di : /opt/lampp/etc/extra/httpd-ssl.conf
<VirtualHost *:443>
ServerName domainnya.go.id
SSLEngine on
SSLCertificateFile /opt/lampp/etc/ssl.cert/file_single.crt
SSLCertificateKeyFile /opt/lampp/etc/ssl.key/private.key
SSLCertificateChainFile /opt/lampp/etc/ssl.cert/DigiCertCA.crt
</VirtualHost>
Atau pakai file gabungan fullchain.pem
:
SSLCertificateFile /opt/lampp/etc/ssl.cert/fullchain.pem
SSLCertificateKeyFile /opt/lampp/etc/ssl.key/private.key
🛠️ Langkah 4: Restart Web Server
sudo /opt/lampp/lampp restart
sudo systemctl restart nginx
🧪 Cek SSL:
- Via browser: buka
https://domainnya.go.id
- Atau pakai tools: https://www.ssllabs.com/ssltest/