Iklan 728x90

Konfigurasi SSL Certificate di Debian 8



HTTP sebuah protokol yang memberikan layanan web. Semua data yang dikirim melalui protokol tersebut tidak terenkripsi (PLAIN Text biasa). Oleh karena itu, perlu kita tambahkan protokol tambahan yang bernama SSL atau TLS. Protokol tersebut berfungsi agar menjadi secure (HTTPS). OpenSSL merupakan kepanjangan dari Secure Socket Layer.

Berikut ini langkah Konfigurasinya
1. Pastikan linux sudah terkoneksi ke internet sehingga bisa kita update paket paket yang di butuhkan
2. Update dan upgrade openssl
# apt-get update
# apt-get upgrade openssl
3. Install apache2
# apt-get install apache2

4. Enable SSL Module
# a2enmod ssl
# a2ensite default-ssl

5. Reload apache2
# /etc/init.d/apache2 reload

6. Membuat direktory untuk ssl
# mkdir /etc/apache2/ssl

7. Membuat Certificate Authority
# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
Lengkapi data yang harus di isikan
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
——-
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:NYC
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Aruba.it
Organizational Unit Name (eg, section) []:SSL Certificate Test
Common Name (e.g. server FQDN or YOUR name) []:example.com               
Email Address []:test@example.com

8. Proteksi dengan merubah hak akses
# chmod 600 /etc/apache2/ssl/*

9. Edit file Virtualhost default
# pipco /etc/apache2/sites-available/000-default.conf

10. Tambahkan script berikut ini di bagian paling bawah
<VirtualHost *:443>
ServerName domain.net
ServerAlias www.domain.net
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
</VirtualHost>

11. Restart apache2
# /etc/init.d/apache2 restart

12. Test hasil konfigurasi
# openssl s_client -connect your_server_ip:443
Output
—-
SSL handshake has read 3999 bytes and written 444 bytes
—-

. . .

SSL-Session:

. . .

Keluar dengan menekan tombol ctrl + c

Hasil konfigurasi bisa anda lihat melalui web browser apakah ssl certificate sudah aktif pastikan tanda gembok muncul dan berwarna hijau.

Post a Comment

0 Comments