Skip to main content

Cara Intall SSL di Localhost Apache Xampp Windows Server

Tutorial ini dibuat oleh Archiliandi (Archil), pengelola website RSUD Kabupaten Pesawaran, Lampung. Saya ceritakan secara singkat ya. RSUD perlu SSL untuk websitenya. Dinas Kominfo menyediakan SSL berbayar yang selanjutnya harus disetel di sisi server Kominfo (karena terkait nama subdomain website RSUD-nya) maupun server RSUD. Nah, tutorial ini ada setting di server internal RSUD. 

 Saya simpan tutorial ini disini guna memudahkan pencarian ketika dibutuhkan.

Berikut langkah-langkahnya:

  1. Siapkan terlebih dahulu text CRT, KEY, CABUNDLE, ini bisa menghubungi Dinas Kominfo Untuk dibuatkan filenya
  2. Copy text CRT ke dalam notepad kemudian disimpan dengan file name certificate.crt
  3. Copy text KEY ke dalam notepad kemudian disimpan dengan file name private.key
  4. Copy text CaBundle ke dalam notepad kemudian disimpan dengan file name ca_bundle.crt
  5. Buat Folder crt di lokasi C:\xampp\apache
  6. Buat Folder dengan nama domain di lokasi C:\xampp\apache\crt
  7. Copy File CRT, KEY, CaBundle ke dalam folder domain yang telah dibuat
  8. Install CRT Klik 2x > Install Certificate > Local Mechine > Place all certificate in the following store >  Browese > Trusted Root Certification Authorities > OK
  9. Install CaBundle Klik 2x > Install Certificate > Local Mechine > Place all certificate in the following store >  Browese > Trusted Root Certification Authorities > OK
  10. Buat Text di notpad

    <VirtualHost *:80>

        ServerAdmin webmaster@nama domain

        DocumentRoot "C:/xampp/htdocs/lokasi file domain "

        ServerName nama domain

        ServerAlias nama domain

        Redirect permanent / https:// nama domain

        <Directory "C:/xampp/htdocs/lokasi file domain">

        AllowOverride All

        Order allow,deny

        Allow from all

        </Directory>

    </VirtualHost>

     

    <VirtualHost *:443>

        ServerAdmin webmaster@nama domain

        DocumentRoot "C:/xampp/htdocs/lokasi file domain"

        ServerName  nama domain

        ServerAlias nama domain

        <Directory "C:/xampp/htdocs/lokasi domain">

        AllowOverride All

        Order allow,deny

        Allow from all

        </Directory>

        SSLEngine On

        SSLCertificateFile "crt/ nama folder certificate /certificate.crt

        SSLCertificateKeyFile "crt/nama folder certificate/private.key

        SSLCertificateChainFile "crt/ nama folder certificate /ca_bundle.crt

    </VirtualHost>

  11. C:\xampp\apache\conf\extra pilih httpd-xampp.conf copy text di atas yang sudah diedit sesuai lokasi file ssl kedalam file httpd-xampp.conf di bagian paling bawah.
  12. Restart apache




Comments