Assalamu'alaykum warahmatullah wabarakatuh Kali ini saya akan share cara memasang SSL pada Apache. Sebenarnya apa sih HTTPS itu ? ...

RHEL 7 Web Server Apache 4 : SSL Web Server Apache RHEL 7


Assalamu'alaykum warahmatullah wabarakatuh
Kali ini saya akan share cara memasang SSL pada Apache. Sebenarnya apa sih HTTPS itu ?


HTTPS (Hyper Text Transfer Protocol Secure) pada halnya sama dengan HTTP, yaitu protokol yang mengatur komunikasi antara client dan server.  Pada umumnya, cara komunikasi antara client dan server adalah client melakukan request ke server, kemudian server mengirimkan respon terhadap client. Respon yang dimaksud dapat berupa file HTML yang akan ditampilkan di browser ataupun data lain yang di-request oleh si client.

Namun HTTPS ini dapat dibilang versi aman dari  HTTP, karena HTTPS ini bekerja bersama dengan protokol SSL (Secure Socket Layer) atau Transport Layer Security (TLS) yang memungkinkan adanya Enkapsulasi dan menambahkan keamanan sebuah jaringan yang diakses pada browser.

OK.. Lanjut aja ke konfigurasi selanjutnya.

MEMBUAT SSL... DISINI


1. Install terlebih dahulu modul ssl agar apache support ssl.
yum -y install mod_ssl


2. Kita buka konfigurasi ssl nya.
nano /etc/httpd/conf.d/ssl.conf


3. Menuju baris ke 59 & 60. Sesuaikan dengan vhost yang anda sudah set. Bisa anda cek cara mengaktifkan vhost.
<VirtualHost _default_:443>

# General setup for the virtual host, inherited from global configuration
DocumentRoot "/var/www/html_utama"
ServerName www.idn-shc.com:443



4.  Menuju baris ke 75, pada kata SSLProtocol. Lalu kita ganti dengan script berikut.
#   SSL Protocol support:
# List the enable protocol levels with which clients will be able to
# connect.  Disable SSLv2 access by default:
SSLProtocol -All +TLSv1 +TLSv1.1 +TLSv1.2


5.  Menuju baris ke 100 dan 107. Atur sesuaikan dengan SSL yang telah dibuat, bisa anda cek disini.
#   Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate.  If
# the certificate is encrypted, then you will be prompted for a
# pass phrase.  Note that a kill -HUP will prompt again.  A new
# certificate can be generated using the genkey(1) command.
SSLCertificateFile /etc/pki/tls/certs/sslserver.crt

#   Server Private Key:
#   If the key is not combined with the certificate, use this
#   directive to point at the key file.  Keep in mind that if
#   you've both a RSA and a DSA private key you can configure
#   both in parallel (to also allow the use of DSA ciphers, etc.)
SSLCertificateKeyFile /etc/pki/tls/certs/sslserver.key



6. Restart aplikasi apachenya.
systemctl restart httpd


7. Lalu izinkan https oleh firewall.
firewall-cmd --add-service=https --permanent
firewall-cmd --reload





UJICOBA CLIENT

1. Buka browser kesayangan anda, dan jangan lupa pasang IP DNS pada windows. Lalu coba akses lewat browser https://idn-shc.com



2. Untuk cek SSL nya, ikuti step berikut untuk dapat melihat info ssl.






0 comments: