Pemasangan SSL Apache2 Pada server Debian

Bangkitkan Private Key

openssl genrsa -des3 -out server.key 2048

 

Bangitkan CSR

openssl req -new -key server.key -out server.csr

 

Hapus Passphrase dari key (Opsional)

cp server.key server.key.org

openssl rsa -in server.key.org -out server.key

 

Bangkitkan Self Signed Certificate

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

 

Dekode csr

openssl req -in server.csr -noout -text

 

Dekode Certificate

openssl x509 -in server.crt -text -noout

 

//Pemasangan sertifikat ssl di apache

 

salin ke direktori yang dapat dibaca oleh apache misal /etc/apache2/ssl (debian)

mkdir -p /etc/apache2/ssl

cp server.key /etc/apache2/ssl/server.key

cp server.crt /etc/apache2/ssl/server.crt

 

tambahkan dalam konfigurasi virtualhost

SSLEngine on

SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt

SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key

 

Restart apache

/etc/init.d/apache2 stop

/etc/init.d/apache2 start

 

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s