Mengaktifkan HTTPS di XAMPP Windows
Pada pembahasan yang lalu pernah dibahas mengenai cara Mengaktifkan HTTPS di Ubuntu, pada kesempatan kali ini kita akan mencoba membahas cara Mengaktifkan HTTPS di XAMPP Windows.
Ada beberapa langkah yang perlu dilakukan:
Langkah 1. Buka Command Prompt di Windows
Start->Run, ketik “cmd” and tekan “OK
Langkah 2. Pindah ke direktori apache (Default XAMPP ada di drive C:\)
cd c:\xampp\apache
Langkah 3. Membuat Sertifikat
Isi dan ikuti langkahnya
C:\\xampp\\apache>newcert Loading 'screen' into random state - done Generating a 1024 bit RSA private key ............................++++++ .....................................++++++ writing new private key to 'privkey.pem' Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
----- 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]:
State or Province Name (full name) [Some-State]:NY Locality Name (eg, city) []:New York Organization Name (eg, company) [Internet Widgits Pty Ltd]:Rob's Great Company Organizational Unit Name (eg, section) []: Common Name (eg, YOUR name) []:
Email Address []: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: Enter pass phrase for privkey.pem:
writing RSA key Loading 'screen' into random state - done Signature ok subject=/C=xx/ST=xx/L=xxxx/O=xxx/CN=commonname Getting Private key ----- Das Zertifikat wurde erstellt. The certificate was provided. Press any key to continue . . . C:\\xampp\\apache>
Langkah 4. Edit Konfigurasi pada Apache C:\xampp\apache\conf\httpd.conf dan sisipkan SSLRequireSSL
<Directory "C:/xampp/htdocs/namafolder">
...
...
SSLRequireSSL
</Directory>
Langkah 5. Restart Apache pada XAMPP Control Panel
Langkah 6. Jalankan di browser https://localhost/namafolder
Selamat Mencoba 🙂
Halo… saya punya server sendiri VPS/Dedicated server, menggunakan OS Windows 10, saya install XAMPP.
sy mau buat http menjadi Htpps, apa bisa dengan tutorial ini ?
dan jg mau tanya,
PEM pass phrase itu password database atau password OS ?
SSLRequireSSL itu apa? dan bagaimana cara mendapatkannya?
mohon pencerahannya
Iya bisa, tapi kalo xampp di pake pada VPS kurang disarankan karena masalah security.
Itu password untuk bikin private key bukan password DB ato OS
SSLRequireSSL Itu command yang dimasukkan ke dalam konfigurasi, untuk enable SSL