Thursday, June 24, 2010

Membuat HTTPS di Fedora

Langkah-langkah pembuatan https adalah :



1. Sebelum memulai membuat https, pastikan service apache 2 sudah terinstall. Jika anda belum menginstall, installah apache 2 dengan perintah

Apt –get install openssl ssl-cert



2. Membuat certificate dengan perintah

mkdir /etc/apache2/ssl

make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem



3. Setelah itu aktifkan mode ssl dan restart apache2 dengan perintah

a2enmod ssl



/etc/init.d/apache2 force-reload



4. Setelah di aktifkan lalu restart service apache2 yaitu dengan perintah

/etc/init.2/apache2 restart



5. Sekarang meginstall paket ketik perintah

# yum install httpd



6. Edit file konfigurasi apache:

# vim /etc/httpd/conf/httpd.conf



Berikut ini adalah beberapa konfigurasi yang perlu dilakukan:



### Section 1: Global Environment

User apache

Group apache

### Section 2: ‘Main’ server configuration

DocumentRoot “/var/www/html”

DirectoryIndex index.html index.html.var index.php

### Section 3: Virtual Hosts

# Konfigurasi virtual host

Include ./conf/vhosts.conf



7. Buat file virtual host:

# vim /etc/httpd/conf/vhosts.conf



NameVirtualHost 192.168.0.22:46

ServerAdmin admin@linuxfedora.local

DocumentRoot /var/www/html

ServerName linuxfedora.local

ServerAlias www.linuxfedora.local

ErrorLog logs/error_log

CustomLog logs/access_log combined

ServerAdmin admin@linuxfedora.local

DocumentRoot /var/www/html/anggifajrian

ServerName anggifajrian.local

ServerAlias www.anggifajrian.local

ErrorLog logs/anggifajrian.local-error_log

CustomLog logs/anggifajrian.local-access_log combined

ServerAdmin admin@linuxfedora.local

DocumentRoot /var/www/html/rasbebas

ServerName rasbebas.local

ServerAlias www.rasbebas.local

ErrorLog logs/rasbebas.local-error_log

CustomLog logs/rasbebas.local-access_log combined



Langkah terakhir adalah mejalankan daemon web server untuk runlevel yang diinginkan:

# /sbin/chkconfig –levels 235 httpd on

0 comments:

Post a Comment