Nota Apache #1

Menambah pilihan untuk akses ke laman web dengan SSL (HTTPS)

*Teknik berikut dilakukan pada Debian GNU/Linux 5

  1. Pasang pakej HTTPD Apache
    aptitude install apache2
  2. Cipta certificate ssl public dan private (cara malas)
    make-ssl-cert generate-default-snakeoil
    cd /etc/ssl/
    cat private/ssl-cert-snakeoil.key certs/ssl-cert-snakeoil.pem > mykey.pem
  3. Benarkan modul ssl untuk Apache2
    a2enmod ssl
  4. Tambah berikut pada /etc/apache2/sites-enabled/000-default (contoh untuk akses HTTPS pada /var/www)
    <VirtualHost *:443>
    	DocumentRoot /var/www/
    	ErrorLog /var/log/apache2/error.log
    	CustomLog /var/log/apache2/access.log combined
    
    	SSLEngine On
    	SSLCertificateFile /etc/ssl/mykey.pem
    </VirtualHost>
  5. Mulakan semula servis apache2
    /etc/init.d/apache2 restart
  6. Digg This
    Reddit This
    Stumble Now!
    Buzz This
    Vote on DZone
    Share on Facebook
    Bookmark this on Delicious
    Kick It on DotNetKicks.com
    Shout it
    Share on LinkedIn
    Bookmark this on Technorati
    Post on Twitter
    Google Buzz (aka. Google Reader)

Leave a Reply

Your email address will not be published. Required fields are marked *