Pages

Senin, 15 April 2013

Modul 2 - Web Server : SSL

Cara Membuat self-signed-certificate SSL Apache

1. Aktifkan Modul SSL
sudo a2enmod ssl
2. Restart Apache
sudo service apache2 restart 
3. Buat directory baru 
sudo mkdir /etc/apache2/ssl   
4. Buat self-signed-certificate SSL
sudo openssl req -x509 -nodes -days 365 
-newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key 
-out /etc/apache2/ssl/apache.crt
5. Pada sesi ini isikan yang berlabel merah sesuai keinginan kita
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]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:NYC
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Awesome Inc
Organizational Unit Name (eg, section) []:Dept of Merriment
Common Name (e.g. server FQDN or YOUR name) []:example.com                  
Email Address []:webmaster@awesomeinc.com 
6. Buka konfigurasi SSL
sudo nano /etc/apache2/sites-available/default 
7. Konfigurasi apache
nano /etc/apache2/sites-available/default 
8.Kemudian isi code berikut di baris terbawah :
SSLEngine on
SSLOptions +StrictRequire
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
           

0 komentar:

Posting Komentar