Install Let’s Encrypt di Apache2

hi,

Nulis lagi nih, ceritanya kemarin iseng-iseng mindah situs ini ke VPS dengan LAMP.
Nah karena sebelumnya situs ini pakai SSL, maka di VPS juga harus install SSL.
Artikel ini akan membahas cara install Let’s Encrypt di Apache2.

Langkah pertama,
– Install OS yang akan digunakan, kebetulan saya menggunakan Ubuntu server 18.04 LTS
– Domain aktif dan sudah mengarah ke IP server vps
– Apache2 sudah diinstal dan berjalan pada port 80, pastikan domain sudah di seting pada vhost

Langkah kedua
Download cerbot-auto Let’s Encrypt client, silahkan simpah di directory /usr/sbin

sudo wget wget https://dl.eff.org/certbot-auto -O /usr/sbin/certbot-auto
sudo chmod a+x /usr/sbin/certbot-auto

Setelah itu install sslnya menggunakan perintah ini

sudo certbot-auto --apache -d rahmat.web.id  -d www.rahmat.web.id

Tunggu prosesnya sampai selesai, hingga muncul keterangan seperti ini

Congratulations! You have successfully enabled https://rahmat.web.id and
https://www.rahmat.web.id

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=rahmat.web.id
https://www.ssllabs.com/ssltest/analyze.html?d=www.rahmat.web.id
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/rahmat.web.id/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/rahmat.web.id/privkey.pem
   Your cert will expire on 2020-01-09. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot-auto
   again with the "certonly" option. To non-interactively renew *all*
   of your certificates, run "certbot-auto renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le
Setelah berhasil, silahkan cek untuk memastikan ssl sudah terinstall seperti gambar diatas.

Langkah ketiga
Seting cronjob agar SSL bisa di auto renew

0 2 * * * sudo /usr/sbin/certbot-auto -q renew

Nah selesai deh, selamat mencoba ya.

Leave a Reply