apache web server
Instalasi dlm bentuk tar
$ tar -xzvf apachexxx.tar.gz
$cd apachexxx
$./configure
$make
$su -
#make install
file konfigurasi berada di:
# /usr/local/apache/httpd.conf
cara start:
# /usr/local/apache/bin/apache1 start
3 CARA MENEMPATKAN FILE DI WEB SERVER
1. DocumentRoot/document utama biasanya/var/www/html
2. UserDir /home/budi/html
3. VirtualHost (bebas selain diatas misal /home/budi/web)
Cara Panggil lewat browser;
/var/www/html => http://localhost
http://192.168.1.23
/home/budi/html => http://localhost/~imi
( User Webspace )
http://192.168.1.23/~imi
atau
www.irfan.lpknf.or.id/~imi
#userdir disable (dipagar #)
userdir html pagarnya di buang atau
userdir public_html kemudian login sebagai imi:
UserDir Public_htnl
sebelumnya chmod /home/imi/html
diexecusi.
bebas =>
ServerAdmin admin@lpknf.or.id
DocumentRoot /home/irfan/html
ServerName irfan.lpknf.or.id
ErrorLog /var/log/httpd/irfan-error_log
Custom /var/log/httpd/irfan-access_log common
Tergantung nama yg di deklarasikan dlm /etc/hosts
di buat dulu -> misal: 192.168.1.23 www.budi.ok
restart apache
ServerRoot “/etc/httpd”
#( direktory utama dimana file configurasi apache di letakan)
PidFile run/httpd.pid
#FILE YG DIGUNAKAN OLEH SERVER UNTUK MEREKAM NOMOR IDENTITAS PROSES (PID))
Timeout 300
#(LAMA WAKTU JEDA SEBELUM SERVER MEMBERI PESAN TIME-OUT )
KeepAlive Off
#(UNTUK MENENTUKAN APAKAH SERVER MENGIJINKAN LEBIH DARI SATU PERMINTAAN DALAM SATU KONEKSI)
MaxKeepAliveRequests 100
#JUMLAH MAXIMUM PERMINTAAN YG DIIJINKAN DALAM SATU KONEKSI/
KeepAliveTimeout 15
#JUMLAH DETIK U/ MENUNGGU PERMINTAAN BERIKUTNYA DARI KLIEN YG SAMA DN KONEKSI BERSAMAAN
StartServer 5
#JUMLAH SERVER YG BERJALAN SAAT DIAKTIFKAN
kemudian restart aphacenya.
MaxRequestsPerChild 30
#JUMLAH PERMINTAAN MAKSIMAL U/ CHILD PROSES
port 80
#port yg digunakan oleh server
User nobody
Group nogroup
#NAMA USER DAN GROUP YG MENJALANKAN HTTPD
ServerAdmin root@localhost
#(MEMBERITAHU HALAMAN2 YG DIBUAT OTOMATIS OLEH SERVER SEPERTI PESAN KESALAHAN)
# ATAU ALAMAT EMAIL DARI ADMINISTRATOR.
ServerName domain.anda.com
#SETTING NAMA BISA JUGA DIGUNAKAN IP
DocumentRoot “/var/www/html”
#(LETAK FILE INDEX.HTML)
ErrorLog logs/error_log
#(LETAK FILE ERROR_LOG BIASANYA TERDAPAT PD DIREKTORY LOKAL)
LogLevel warn
#(JUMLAH PESAN KESALAHAN YG DI CATAT DLM FILE ERROR_LOG. NILAI YG DIMASUKAN
ANTARA DEBUG, WARN,ALER,ERROR)
Melihat Modul apa yg sudah terkompilasi
#/usr/sbin/httpd -l
Melihat Modul alias
#ls /usr/lib/httpd/modules/ |grep alias
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”
AllowOverride None
Order allow,deny
Allow from all
#
#MOD_ALIAS HARUS AKTIF
#BUAT SEPERTI SCRIPT DI ATAS.
contoh file shellpro
#!/bin/bash
echo Conten-type: text/plain
echo
echo “Assalamualikum”
echo “direkroti cgi-bin:”
echo
echo “admin”
Instalasi apache dan openssl
#############################
download source di http://www.apache.org/dist
Setelah berhasil download source apache, lakukan extrak di /usr/src
root#tar -xzvf apacheXXXX.tar.gz
root#cd apacheXXXX
root#./configure
root#make
root#make install
Lalu konfigurasi apache yang berada direktori
/usr/local/apache/conf/httpd.conf
setelelah konfigurasi selesai jalankan apache
root#/usr/local/apache/bin/apachectl restart
modul yang sudah terinstall berada di
/usr/src/apachexxxx/src/modules/standart
atau kalau kita ingin menentukan sendiri modul yang akan diinstalkan pada saat
instal apache lakukan perintah berikut:
root#./configure –add-modules=src/modules/standart/mod_nama_modules.c -enable-modul=nama_modul
Jika tidak ingin menyertakan salah satu modul, bisa mengunakan perintah:
root#./configure –disable-module=nama_modules.
instalasi openssl
Pertukaran data anatara client dan server, seperti anda tahu kalau sebuah data untuk sampai tujuan bisa jadi melewati beberapa tempat di internet.
Untuk mengamankan data anda dijalan maka perlu adanya suatu enkripsi data.
openssl (open secure socket layer) merupakan proyek pengembanga dari TLS (transport Layer Security).
source bisa anda download di http://www.opensssl.org
extrak source program di /usr/src
tar -xzvf opensslxxx.tar.gz
cd opensslxxxx
./config
make
make test
make install
Membuat kunci pribadi.
masuk kedirektori untuk membuat kunci pribadi dan sertifikat
cd /usr/local/ssl
membuat requet untuk sertifikat dan kunci pribadi.
/usr/local/ssl/bin/openssl req -new > server.csr
menghapus passphrase dari kunci pribadi.
/usr/local/ssl/bin/openssl rsai -in privkey.pem -out server.key
membuat sertifikat yang dapat dapat dilakukan sebelum mengambil sertifikat
/usr/local/ssl/bin/openssl x509 -in server, -out server.cert -req-singkey server.key -days 365.
apache+mod_ssl
cd /usr/src
tar -xzvf mod_sslxxxxx.tar.gz
cd mod_sslxxx
./configure –with-apache=/usr/src/apache –with-ssl=/usr/src/opensslxxx/ssl/ 00with crt=/usr/local/ssl/server.cert –with-key=/usr/local/ssl/server.key
cd /usr/src/apache
make
make install
cd /usr/src/apachexxxx