{"id":538,"date":"2024-06-12T10:01:32","date_gmt":"2024-06-12T03:01:32","guid":{"rendered":"https:\/\/focusnic.com\/blog\/?p=538"},"modified":"2024-11-22T23:43:42","modified_gmt":"2024-11-22T16:43:42","slug":"cara-install-web-server-apache-almalinux-8","status":"publish","type":"post","link":"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/","title":{"rendered":"Cara Install Apache Web Server di Cloud VPS AlmaLinux 8"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Apa_itu_Apache_Web_Server\" >Apa itu Apache Web Server ?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Persyaratan\" >Persyaratan<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Langkah_1_%E2%80%94_Install_Apache\" >Langkah 1 &#8212; Install Apache<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Langkah_2_%E2%80%94_Konfigurasi_Keamanan_dan_Firewall\" >Langkah 2 &#8212; Konfigurasi Keamanan dan Firewall<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Langkah_21_%E2%80%94_Konfigurasi_SELinux\" >Langkah 2.1 &#8212; Konfigurasi SELinux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Langkah_22_%E2%80%94_Konfigurasi_Firewalld\" >Langkah 2.2 &#8212; Konfigurasi Firewalld<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Langkah_3_%E2%80%94_Akses_Apache_Melalui_Browser\" >Langkah 3 &#8212; Akses Apache Melalui Browser<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Langkah_4_%E2%80%94_Konfigurasi_VirtualHost_Lanjutan\" >Langkah 4 &#8212; Konfigurasi VirtualHost (Lanjutan)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Langkah_5_%E2%80%94_Install_SSL_Lets_Encrypt_Lanjutan\" >Langkah 5 &#8212; Install SSL Let&#8217;s Encrypt (Lanjutan)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/focusnic.com\/blog\/cara-install-web-server-apache-almalinux-8\/#Kesimpulan\" >Kesimpulan<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Apa_itu_Apache_Web_Server\"><\/span>Apa itu Apache Web Server ?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>Web server adalah<\/strong> perangkat lunak yang berfungsi untuk menerima dan memproses permintaan (request) HTTP\/HTTPS dari klien (biasanya web browser) dan mengembalikan respons dalam bentuk halaman web. <strong><a href=\"https:\/\/httpd.apache.org\/\" target=\"_blank\" rel=\"noopener\">Apache<\/a> adalah<\/strong> salah satu web server yang paling populer dan banyak digunakan di seluruh dunia.<\/p>\n\n\n\n<p>Dalam tutorial ini kami akan menggunakan server <a href=\"https:\/\/focusnic.com\/compute-ssd\">Cloud VPS SSD Storage<\/a>. Lalu kita akan mempelajari bagaimana cara  menginstall apache web server pada server AlmaLinux 8.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Persyaratan\"><\/span>Persyaratan<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Sebelum mengikuti tutorial ini, pastikan Anda memenuhi persyaratan berikut:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Akses ke server dengan sistem operasi AlmaLinux 8.<\/li>\n\n\n\n<li>Koneksi internet yang stabil untuk melakukan proses instalasi.<\/li>\n\n\n\n<li>Hak akses root atau pengguna dengan izin sudo untuk menjalankan perintah.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Langkah_1_%E2%80%94_Install_Apache\"><\/span>Langkah 1 &#8212; Install Apache<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Sebelum menginstall web server Apache, sebaiknya Anda terlebih dahulu memperbarui paket-paket sistem pada server Anda. Memperbarui sistem operasi akan memastikan bahwa Anda memiliki dependensi dan paket terbaru yang diperlukan untuk proses instalasi dan pengoperasian Apache web server.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">dnf update -y<\/pre><\/div>\n\n\n\n<p>Opsi&nbsp;<strong>-y<\/strong>&nbsp;digunakan untuk mengotomasi proses pembaruan. Dengan menggunakan&nbsp;<strong>-y<\/strong>, Anda tidak perlu melakukan konfirmasi manual saat perintah meminta persetujuan untuk memperbarui paket-paket.<\/p>\n\n\n\n<p>Kemudian install Apache, jalankan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">dnf install httpd -y<\/pre><\/div>\n\n\n\n<p>Setelah proses instalasi selesai, jalankan perintah berikut untuk mengaktifkan service Apache agar dapat berjalan <em>auto start <\/em>saat server dihidupkan kembali<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">systemctl enable --now httpd<\/pre><\/div>\n\n\n\n<p>Setelah menginstal dan mengaktifkan service Apache Web Server, Anda dapat memeriksa status dari service tersebut dengan menjalankan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">systemctl status httpd<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Langkah_2_%E2%80%94_Konfigurasi_Keamanan_dan_Firewall\"><\/span>Langkah 2 &#8212; Konfigurasi Keamanan dan Firewall<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Pada bagian ini kita akan menyesuaikan hak akses dan firewall, Anda dapat melewati langkah ini apabila Anda tidak menggunakan SELinux dan Firewalld pada server Anda.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Langkah_21_%E2%80%94_Konfigurasi_SELinux\"><\/span>Langkah 2.1 &#8212; Konfigurasi SELinux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Dalam tutorial kami akan mematikan SELinux karena mungkin akan menyebkan konflik, cek status SELinux dengan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">sestatus<\/pre><\/div>\n\n\n\n<p>Berikut contoh output apabila SELinux dalam keadaan aktif<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">SELinux status:                 enabled\nSELinuxfs mount:                \/sys\/fs\/selinux\nSELinux root directory:         \/etc\/selinux\nLoaded policy name:             targeted\nCurrent mode:                   enforcing\nMode from config file:          enforcing\nPolicy MLS status:              enabled\nPolicy deny_unknown status:     allowed\nMemory protection checking:     actual (secure)\nMax kernel policy version:      33<\/pre><\/div>\n\n\n\n<p>Matikan SELinux sementara<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">setenforce 0<\/pre><\/div>\n\n\n\n<p>Cek SELinux dengan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">sestatus<\/pre><\/div>\n\n\n\n<p>Berikut contoh output apabila SELinux dalam keadaan disable sementara, SELinux masih aktif namun pada bagian <strong>Current mode<\/strong> statusnya sudah <strong>permissive<\/strong> hingga server di reboot<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">SELinux status:                 enabled\nSELinuxfs mount:                \/sys\/fs\/selinux\nSELinux root directory:         \/etc\/selinux\nLoaded policy name:             targeted\nCurrent mode:                   permissive\nMode from config file:          enforcing\nPolicy MLS status:              enabled\nPolicy deny_unknown status:     allowed\nMemory protection checking:     actual (secure)\nMax kernel policy version:      33<\/pre><\/div>\n\n\n\n<p>Untuk mematikan secara SELinux permanen, buka file konfigurasi SELinux dengan editor <strong>nano<\/strong> atau <strong>vim<\/strong><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">nano \/etc\/sysconfig\/selinux<\/pre><\/div>\n\n\n\n<p>Kemudian ubah parameter berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">SELINUX=enforcing<\/pre><\/div>\n\n\n\n<p>Menjadi<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">SELINUX=disabled<\/pre><\/div>\n\n\n\n<p>Perubahan diatas memerlukan reboot server, namun karena sebelumnya kita sudah mengatur akses SELinux menjadi <strong>permissive<\/strong> jadi Anda tidak perlu memerlukan reboot<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Langkah_22_%E2%80%94_Konfigurasi_Firewalld\"><\/span>Langkah 2.2 &#8212; Konfigurasi Firewalld<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Cek status firewalld pada server dengan perintah berikut, jika statusnya <strong>Active<\/strong> maka Firewalld sudah terinstall pada server dan Anda harus mengkonfigurasi Firewalld agar dapat melewatkan trafik dari port 80 dan 443 untuk Web Server HTTP dan HTTPS<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">systemctl status firewalld<\/pre><\/div>\n\n\n\n<p>Tambahkan rule pada firewall menggunakan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">firewall-cmd --add-port={80,443}\/tcp --permanent<\/pre><\/div>\n\n\n\n<p><kbd><strong>--add-port={80,443}\/tcp<\/strong><\/kbd> adalah opsi untuk menambahkan port ke daftar port yang diizinkan oleh firewall. Dalam kasus ini, port 80 (HTTP) dan port 443 (HTTPS) untuk protokol TCP.<\/p>\n\n\n\n<p><kbd><strong>--permanent<\/strong><\/kbd> adalah opsi yang menyebabkan perubahan konfigurasi firewall berlaku secara permanen, sehingga tidak hilang setelah sistem direkonfigurasi atau dihidupkan ulang.<\/p>\n\n\n\n<p>Setelah Anda melakukan perubahan pada pengaturan firewall. Kemudian reload Firewall dengan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">firewall-cmd --reload<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Langkah_3_%E2%80%94_Akses_Apache_Melalui_Browser\"><\/span>Langkah 3 &#8212; Akses Apache Melalui Browser<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Akses Apache Web Server melalui browser dan tuliskan IP Anda pada browser atau <strong>http:\/\/ip.address.server<\/strong> Anda akan melihat tampilan bawaan Apache Web Server pada AlmaLinux <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"360\" src=\"https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-22-1024x360.png\" alt=\"\" class=\"wp-image-581\" title=\"\" srcset=\"https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-22-1024x360.png 1024w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-22-300x105.png 300w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-22-768x270.png 768w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-22-1536x540.png 1536w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-22-640x225.png 640w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-22.png 1850w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Langkah_4_%E2%80%94_Konfigurasi_VirtualHost_Lanjutan\"><\/span>Langkah 4 &#8212; Konfigurasi VirtualHost (Lanjutan)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Pada tahap ini kami mengasumsikan Anda sudah melakukan pointing A record pada domain Anda ke server. Jika Anda belum pernah melakukan pointing DNS silahkan ikuti tutorial <a href=\"https:\/\/focusnic.com\/blog\/cara-mengakses-server-dengan-domain\/\">Cara Mengakses Server dengan Domain<\/a><\/p>\n\n\n\n<p>Setelah Anda melakukan pointing domain, maka selanjutnya buat sebuah file untuk menyimpan konfigurasi virtual host, jalankan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">nano \/etc\/httpd\/conf.d\/nama-domain.conf<\/pre><\/div>\n\n\n\n<p>Isi dengan script berikut, dan ubah pada bagian <strong>nama_domain.com<\/strong> dengan nama domain Anda yang sudah terpointing pada server<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">&lt;VirtualHost *:80&gt;\n    ServerName nama-domain.com\n    DocumentRoot \/var\/www\/nama-domain.com\/public_html\n    ErrorLog logs\/nama-domain.com_error.log\n    CustomLog logs\/nama-domain.com_access.log combined\n&lt;\/VirtualHost&gt;<\/pre><\/div>\n\n\n\n<p>Setelah itu jalankan perintah berikut untuk membuat direktori, sesuaikan <strong>nama-domain.com<\/strong> dengan domain Anda yang valid. Opsi&nbsp;<strong><kbd>-p<\/kbd><\/strong>&nbsp;(atau&nbsp;<kbd><strong>--parents<\/strong><\/kbd>) digunakan untuk membuat direktori beserta direktori induknya (parent directories) jika direktori tersebut belum ada. <\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">mkdir -p \/var\/www\/nama-domain.com\/public_html<\/pre><\/div>\n\n\n\n<p>Ubah permission dan sesuaikan dengan lokasi direktori virtualhost Anda<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">chown -R apache:apache \/var\/www\/nama-domain.com\/<\/pre><\/div>\n\n\n\n<p>Setelah VirtualHost dibuat, maka selanjutnya Anda akan mencoba untuk menghosting website Anda. Kami akan menggunakan demo HTML yang di sediakan oleh komunitas Github<\/p>\n\n\n\n<p>Install <strong>git<\/strong> untuk cloning project dari Github<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">dnf install git -y<\/pre><\/div>\n\n\n\n<p>Pindah ke direktori virtualhost yang sudah dibuat sebelumnya lalu jalankan perintah berikut untuk clonning project dari Github<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">cd \/var\/www\/nama-domain.com\/public_html\ngit clone https:\/\/github.com\/atulcodex\/nihory-basic.git\nmv nihory-basic\/* .<\/pre><\/div>\n\n\n\n<p>Setelah itu akses menggunakan web browser menggunakan domain yang sudah Anda pointing, apabila Anda sudah berhasil mengikuti semua langkah dengan benar maka tampilannya akan seperti berikut<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"487\" src=\"https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-23-1024x487.png\" alt=\"install apache almalinux 8 - demo\" class=\"wp-image-599\" title=\"\" srcset=\"https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-23-1024x487.png 1024w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-23-300x143.png 300w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-23-768x366.png 768w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-23-1536x731.png 1536w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-23-640x305.png 640w, https:\/\/focusnic.com\/blog\/wp-content\/uploads\/2024\/06\/image-23.png 1769w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Langkah_5_%E2%80%94_Install_SSL_Lets_Encrypt_Lanjutan\"><\/span>Langkah 5 &#8212; Install SSL Let&#8217;s Encrypt (Lanjutan)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Langkah ini merupakan opsional, Anda bebas dapat menginstall SSL Gratis dari Let&#8217;s Encrypt dengan masa aktif 3 bulan (auto renew) atau Anda membeli dari vendor SSL dengan berbagai variasi dan masa aktif yang lebih lama hingga 365 hari atau 1 tahun.<\/p>\n\n\n\n<p>Install Certbot dan dependensi yang diperlukan lainnya menggunakan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">dnf -y install certbot python3-certbot-apache mod_ssl<\/pre><\/div>\n\n\n\n<p>Kemudian jalankan perintah berikut, sesuaikan <strong>nama-domain.com<\/strong> dengan domain yang sudah Anda pointing ke server<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">certbot --apache -d nama-domain.com<\/pre><\/div>\n\n\n\n<p>Jika Anda baru pertama kali menginstall SSL Let&#8217;s Encrypt dengan Certbot maka silahkan instrukti yang muncul pada contoh berikut dan sesuaikan dengan data Anda<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">Saving debug log to \/var\/log\/letsencrypt\/letsencrypt.log\nEnter email address (used for urgent renewal and security notices)\n (Enter 'c' to cancel): admin@nama-domain.com\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPlease read the Terms of Service at\nhttps:\/\/letsencrypt.org\/documents\/LE-SA-v1.4-April-3-2024.pdf. You must agree in\norder to register with the ACME server. Do you agree?\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n(Y)es\/(N)o: Yes\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nWould you be willing, once your first certificate is successfully issued, to\nshare your email address with the Electronic Frontier Foundation, a founding\npartner of the Let's Encrypt project and the non-profit organization that\ndevelops Certbot? We'd like to send you email about our work encrypting the web,\nEFF news, campaigns, and ways to support digital freedom.\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n(Y)es\/(N)o: No \nAccount registered.\nRequesting a certificate for nama-domain.com\n\nSuccessfully received certificate.\nCertificate is saved at: \/etc\/letsencrypt\/live\/nama-domain.com\/fullchain.pem\nKey is saved at:         \/etc\/letsencrypt\/live\/nama-domain.com\/privkey.pem\nThis certificate expires on 2024-09-08.\nThese files will be updated when the certificate renews.\nCertbot has set up a scheduled task to automatically renew this certificate in the background.\n\nDeploying certificate\nSuccessfully deployed certificate for myapache.focusnic.biz.id to \/etc\/httpd\/conf.d\/nama-domain.com-le-ssl.conf\nCongratulations! You have successfully enabled HTTPS on https:\/\/nama-domain.com\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nIf you like Certbot, please consider supporting our work by:\n * Donating to ISRG \/ Let's Encrypt:   https:\/\/letsencrypt.org\/donate\n * Donating to EFF:                    https:\/\/eff.org\/donate-le\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<\/pre><\/div>\n\n\n\n<p>Setelah itu Anda dapat mengakses website Anda dengan <strong>HTTPS<\/strong> melalui browser<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Kesimpulan\"><\/span>Kesimpulan<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Pada artikel ini Anda sudah mempelajari bebera langkah seperti instalasi Apache, konfigurasi keamanan dan firewall, membuat virtualhost, dan menginstall SSL Let&#8217;s Encrypt menggunakan Certbot untuk memberikan keamanan ekstra pada website Anda.<\/p>\n\n\n\n<p>Jangan lupa untuk selalu menjaga keamanan dan memperbarui paket-paket sistem Anda agar tetap aman dan terlindungi dari ancaman keamanan yang mungkin muncul.<\/p>\n\n\n\n<p>Semoga tutorial ini bermanfaat bagi Anda. Jika Anda memiliki pertanyaan atau membutuhkan bantuan lebih lanjut, jangan ragu untuk menghubungi kami.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apa itu Apache Web Server ? Web server adalah perangkat lunak yang berfungsi untuk menerima dan memproses permintaan (request) HTTP\/HTTPS dari klien (biasanya web browser) dan mengembalikan respons dalam bentuk halaman web. Apache adalah salah satu web server yang paling populer dan banyak digunakan di seluruh dunia. Dalam tutorial ini kami akan menggunakan server Cloud [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":546,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[13,23],"class_list":{"0":"post-538","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorial","8":"tag-apache","9":"tag-server"},"_links":{"self":[{"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/posts\/538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/comments?post=538"}],"version-history":[{"count":62,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/posts\/538\/revisions"}],"predecessor-version":[{"id":611,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/posts\/538\/revisions\/611"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/media\/546"}],"wp:attachment":[{"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/media?parent=538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/categories?post=538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/tags?post=538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}