Apache2 HTTPS - PowerPoint PPT Presentation

About This Presentation
Title:

Apache2 HTTPS

Description:

Uji dengan https, akan muncul sertifikat dari server dan autentikasinya URL : https://localhost TERIMA KASIH . Title: Apache2 HTTPS Author: Idris Winarno – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 8
Provided by: IdrisW
Category:
Tags: https | apache2 | kasih

less

Transcript and Presenter's Notes

Title: Apache2 HTTPS


1
Apache2 HTTPS
2
  • 1. Install webserver Apache
  • apt-get install apache2
  • 2. Buat direktori untuk menyimpan file https
  • mkdir /var/www/secure
  • 3. Instalasi openssl
  • apt-get install openssl ssl-cert
  • mkdir /etc/apache2/ssl
  • Enable apache2 module
  • a2enmod ssl
  • a2enmod auth_basic
  • 4. Tambahkan konfigurasi ports SSL
  • vim /etc/apache2/ports.conf
  • Listen 80
  • Listen 443
  • 5. Create file virtual
  • vim /etc/apache2/virtual
  • NameVirtualHost 80
  • NameVirtualHost 443

3
  • 5. Hapus NameVirtualHost pada file
    /etc/apache2/sites-available/default
  • 6. Edit konfigurasi apache
  • vim /etc/apache2/sites-enabled/000-default
  • ltVirtualHost 443gt
  • SSLEngine On
  • SSLCertificateFile /etc/apache2/ssl/server.cert
  • SSLCertificateKeyFile /etc/apache2/ssl/server.key
  • ServerName Komdig
  • ServerAdmin idris_at_eepis-its.edu
  • ProxyRequests Off
  • DocumentRoot /var/www/secure
  • Alias /secure /var/www/secure
  • ltDirectory /var/www/secure/gt
  • AuthUserFile /etc/apache2/.htpasswd
  • AuthName EnterPassword
  • AuthType Basic
  • require valid-user
  • Order Deny,allow
  • Allow from all

4
  • Buat sertifikat di sisi server
  • cd /etc/apache2/ssl
  • openssl req -new gt server.csr
  • openssl rsa -in privkey.pem -out server.key
  • openssl x509 -in server.csr -out server.cert
    -req -signkey server.key -days 365
  • 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.

5
  • -----
  • Country Name (2 letter code) AUID
  • State or Province Name (full name)
    Some-StateEast Java
  • Locality Name (eg, city) Surabaya
  • Organization Name (eg, company) Internet
    Widgits Pty LtdPENS-ITS
  • Organizational Unit Name (eg, section) Jarkom
  • Common Name (eg, YOUR name) idris
  • Email Address idris_at_eepis-its.edu
  • Please enter the following 'extra' attributes
  • to be sent with your certificate request
  • A challenge password passwordku
  • An optional company name PENS-ITS

6
  • 7. Buat password untuk masuk ke webserver
    (apache2)
  • htpasswd -c /etc/apache2/.htpasswd idris
  • 8. Restart apache
  • /etc/init.d/apache2 restart
  • 9. Ujicoba dengan menggunakan browser, catat dan
    analisa
  • a. Uji dengan http
  • URL http//localhost
  • b. Uji dengan https, akan muncul sertifikat dari
    server dan autentikasinya
  • URL https//localhost

7
TERIMA KASIH
Write a Comment
User Comments (0)
About PowerShow.com