Rabu, 09 Juni 2010

Step Pembuatan https

Pastikan service apache 2 sudah di install, jika belum, silahkan install dengan perintah :
Apt –get install openssl ssl-cert
Membuat certificate :
mkdir /etc/apache2/ssl
make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
Aktifkan mode ssl dan restart apache2
a2enmod ssl
/etc/init.d/apache2 force-reload
Restart service apache2
/etc/init.2/apache2 restart
Install paket:
# yum install httpd
Edit file konfigurasi apache:
# vim /etc/httpd/conf/httpd.conf
Berikut 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
Buat file virtual host:
# vim /etc/httpd/conf/vhosts.conf
NameVirtualHost 192.168.0.22:80

ServerAdmin admin@linuxer.local
DocumentRoot /var/www/html
ServerName linuxer.local
ServerAlias www.linuxer.local
ErrorLog logs/error_log
CustomLog logs/access_log combined


ServerAdmin admin@linuxer.local
DocumentRoot /var/www/html/fxdiani
ServerName fxdiani.local
ServerAlias www.fxdiani.local
ErrorLog logs/fxdiani.local-error_log
CustomLog logs/fxdiani.local-access_log combined


ServerAdmin admin@linuxer.local
DocumentRoot /var/www/html/bandung
ServerName bandung.local
ServerAlias www.bandung.local
ErrorLog logs/bandung.local-error_log
CustomLog logs/bandung.local-access_log combined

Jalankan daemon web server untuk runlevel yang diinginkan:
# /sbin/chkconfig –levels 235 httpd on

Tidak ada komentar:

Posting Komentar