Edit Apache Server Di Debian Zuliana
Click here to load reader
-
Upload
api-3723707 -
Category
Documents
-
view
265 -
download
1
Transcript of Edit Apache Server Di Debian Zuliana
KONFIGURASI WEB SERVER BERBASIS DEBIAN
Untuk mengkonfigurasi webserver adalah sebagai berikut :
file /etc/apache2/apache2.conf
ServerRoot "/etc/apache2" Tambahkan: ServerName spasi NAMA DOMAIN, misal: servername poetry.com PidFile /var/run/apache2.pid Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15
Konfigurasi Apache ————————-
Edit httpd.conf yang berada di /usr/local/apache/conf/ , dan tambahkan baris berikut :
AddType application/x-tar .tgz AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
jalankan apache :
# /usr/local/apache/bin/apachectl start
Untuk melihat konfigurasi yang kita buat dapat membuat suatu file php. misalnya kita buat file phpinfo.php dan isinya adalah sebagai berikut:
simpan file tersebut dan letakkan di direktori web server. Untuk melihatnya kita dapat mengakses halaman http://localhost/phpinfo.php
• server.document-root = “/var/www/html”: Letak default dokumen. • server.port = 80: Port yang digunakan Lighty. • server.username = “lighttpd” • server.groupname = “lighttpd”: Nama dan grup yang digunakan untuk
menjalankan lighty.
• server.bind = “server-ip-address”: IP yang digunakan, bisa juga diisi dengan nama host, misal kates.com.
• server.tag =”lighttpd”: Tag server default sebagai pengenal. Demi keamanan ganti dengan (misal): server.tag ="myWebServer v1.0"
• server.errorlog = “/var/log/lighttpd/error.log”: file error-log. • accesslog.filename = “/var/log/lighttpd”: file accesslog • index-file.names = ( “index.php”, “index.html” ): Daftar file yang akan
dieksekusi pertama kali.
server.modules = ( “mod_access”, “mod_accesslog”, “mod_fastcgi”, “mod_rewrite”, “mod_auth” ): daftar module yang di load oleh lighty:
• mod_access: The access module is used to deny access to files with given trailing path names.
• mod_accesslog: Use to write CLF log, flexible like apache • mod_fastcgi : FastCGI for perl/PHP etc • mod_rewrite : Good for writing SEO urls • mod_auth: Authntication (password protected directory)
mimetype.assign = ( “.pdf” => “application/pdf”, “.sig” => “application/pgp-signature” ): Use to setup mimetype mapping.
Buka dan edit file /etc/lighttpd/lighttpd.conf : # vim /etc/lighttpd/lighttpd.conf
Simpan file dan start lighttpd: # /etc/init.d/lighttpd start
Cek apakah sudah jalan ato belom: $ netstat -ntulp
Hasil pengecekan:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 29855/sshd tcp 0 0 203.111.103.81:80 0.0.0.0:* LISTEN 5866/lighttpd
Buka browser dan akses ke alamat URL: http://your-domain.com/ or http://server-ip/
menkonfigurasi webserver apache agar bisa mendukung WAP
1. pastikan kmu telah menginstal webserver apache, bisa dengan php triad ataupun AppServ klo saya lebih enak menggunakan AppServ.
2. Buka file httpd.conf , klo kmu menginstal AppServ biasanya letak filenya berada pada C:\AppServ\Apache2.2\conf tergantung versi AppServ yang kmu instal kemudian tambahkan parameter dibawah ini dan letakan pada baris setelah parameter AddType yang berhubungan dengan php. ————————————————— AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php-source .phps #Tambahan parameter untuk wap disini AddType application/x-httpd-php .wml AddType text/vnd.wap.wml .wml AddType image/vnd.wap.wbp .wbmp AddType text/vnd.wap.wmlscript .wmlsc AddType text/vnd.wap.wmlscript .wmls AddType application/vnd.wap.wmlc .wmlc AddType application/vnd.wap .wmlscriptc AddType text/vnd.wap .wmlscript AddType text/vnd.wap .wmlscript —————————————————
3. Setelah itu save file httpd.conf kemudian restart apache nya. 4. Untuk men-tesnya kmu bisa menggunakan Emulator WAP seperti Openwave
Phone Simulator atau M3Gate silahkan download dulu dan install dikomputer kmu kemudian buat satu halaman wapsite dengan menggunakan bahasa pemrograman WML dan simpan filenya pada root direktori biasanya secara default berada dilokasi C:\AppServ\www
By : ZULIANA SAFITRI Class : 3 of Tkj Absen : 24