Cara merubah file .pfx ke crt dan rsa untuk ssl nginx


Catatan pribadi cara merubah file .pfx (biasanya didapat dari pengelola domain) untuk digunakan di nginx web server begini caranya

openssl pkcs12 -in .file.pfx -clcerts -nokeys -out domain.crt

openssl pkcs12 -in file.pfx -nocerts -nodes -out domain.rsa

Langkah selanjutnya tinggal memasukkan crt dan rsa ke nginx config kalian, biasanya ada di /etc/nginx/sites-available/default

Ubah dibagian ini ya

server { listen 443 ssl; server_name domain.com domain.com; 

ssl_certificate /path/to/your/CRT_file/domain.crt; 

ssl_certificate_key /path/to/your/RSA_file/domain.rsa; 

root /var/www/html/; 

index index.html; 

include /etc/nginx/mime.types; }

Done selesai gampang kan?

Happy Coding …

Salam Ngoprek …

Published by

susiloharjo

Khoirunnas anfa'ahum linnas A Father, Husband and love to learn person Love my Family, Electronics, Photography, Robot, Dreaming, Programming

Ditunggu komennya ...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.