# # vim:sw=2 ts=8:et sta # # $MyBSD: src/gelojoh/gelojoh.conf.sample,v 1.5 2004/05/20 17:21:06 skywizard Exp $ # # Gelojoh Web Server config, : gelojoh.conf # # Listen # ------ # # Format: # Listen IP/PORT # - Listen 127.0.0.1/80 # Listen HOSTNAME/PORT/STACK # - Listen kasumi.MyBSD.org.my/80/ipv4 # - Listen kasumi.MyBSD.org.my/80/ipv6 # - Listen kasumi.MyBSD.org.my/80 (maksudnya ipv4 dan ipv6) # # Kalau guna ip, tak perlu suruh ipv4/v6 # pasal benda tu dah jelas stack mana dia nak # melekat Listen 0.0.0.0/80 # IPv4 global address, semua interface/ip Listen ::/80 # IPv6 wildcard, semua interface/ip termasuk IPv4! # AWAS: TAK SEMUA OS IMPLEMENT IPv6 WILDCARD!!! Listen 192.168.0.1/80 # IPv4 Listen 3ffe:b80:1fc6:1:260:97ff:fe67:3c17/80 # IPv6 Listen kasumi.MyBSD.org.my/80/ipv4 # Dengan tegas, IPv4 Listen kasumi.MyBSD.org.my/80 # dia akan melekat dekat apa-apa stack Listen 80 # Global , kalau support IPv6 wildcard '::', atau pun dia # guna 0.0.0.0 - port 80 (SUGGESTED) # # Host # ---- # # Format: # Host nama.mesin.whatever # # Nama host/mesin (tengok Vhost kat bawah) # Host localhost # # SSL (Unix sahaja) # --- # # Format: # ListenSSL 443 # - ListenSSL sama seperti 'Listen', kebiasaannya guna # port 443 # SSLCertificate "/mana/ssl.crt" # SSLKey "/mana/ssl.key" # # Kalau salah satu tak valid, cert/key akan auto-generate. # Kalau guna single pem format, point kedua-dua directive terhadap # file yang sama # #ListenSSL 443 #SSLCertificate "/usr/Junk/SSL/kasumi.crt" #SSLKey "/usr/Junk/SSL/kasumi.key" # # LogFile (Unix sahaja) # ------- # # Format: # LogFile "/mana/file.log" # # Bagi win32, segala logging akan dikeluarkan di STDERR/STDOUT # LogFile "/var/log/gelojoh.log" # # PidFile (Unix sahaja) # ------- # # Format: # PidFile "/mana/file.pid" # # File di mana proses id disimpan, kelak boleh berhentikan # server secara kill `cat /mana/file.pid` # PidFile "/var/run/gelojoh.pid" # # Daemon (Unix sahaja) # ------ # # Format: # Daemon true # Daemon yes # Daemon y # # Fork ke background, daemonize # Daemon yes # # BlockSize # --------- # # Format: # BlockSize 1024 (angka biasa) # BlockSize 1 << 12 (bitshift) # # Jumlah / saiz buffer dalam setiap socket read/write. # Terlalu besar, menyebabkan network senak/congestion # Terlalu kecil, membuang kitaran cpu # Cadangan: 4096 atau 1 << 12 # Bitshift? $ printf "%d\n" "1 << 12" # BlockSize 1 << 12 # 4096 # ServerTag # --------- # # Format: # ServerTag "whatever lala my server so 1337" # # Custom server identification :) # #ServerTag "Gelojoh 1.1 IPv4/IPv6 2003-12-28 IN_PROGRESS / Ruby 1.8.1 (i386-freebsd4)" # RunAs (Unix sahaja) # ----- # # Format: # RunAs user # # Run proses sebagai 'user' (drop privilege) RunAs nobody # MaxClient # --------- # # Format: # MaxClient jumlahASALKANangka # # Berapa banyak concurrent client yang kita bagi peluang MaxClient 50 # MaxListen # --------- # # Format: # MaxListen jumlahASALKANangka # # Berapa banyak queue socket yang kita bagi peluang # untuk connection beratur menunggu masa untuk # diproses MaxListen 25 # KeepAliveTimeout (HTTP/1.1) # ---------------- # # Format: # KeepAliveTimeout jumlahASALKANangka # # Tempoh masa bagi client yang connect idle, sebelum # server akan putuskan connection (saat) KeepAliveTimeout 120 # KeepAliveMax (HTTP/1.1) # ------------ # # Format: # KeepAliveMax jumlahASALKANangka # # Jumlah hit yang kita benarkan untuk "keep-alive" connection # sebelum server akan putuskan connection KeepAliveMax 100 # DocumentRoot # ----------- # # Format: # DocumentRoot /unix/punya/cara # DocumentRoot C:/Windows/punya/cara # # DocumentRoot merujuk kepada directory teratas # dalam hirarki directory web DocumentRoot /usr/local/gelojoh # DocumentIndex / DocumentIndex4 / DocumentIndex6 # ----------------------------------------------- # # Format: # DocumentIndex nama.satu nama.apa apaapa.sahaja # DocumentIndex4 index.html # DocumentIndex6 index.6.html # # Benda ni penting bila user browse, Gelojoh akan tunjukkan # file mana yang jadi default untuk dipaparkan. 'DocumentIndex' # mewakili IPv4/IPv6, 'DocumentIndex{4,6}' utk. lebih spesifik # bergantung dengan network stack. DocumentIndex index.html index.htm # MimeTypes # --------- # # Format: # MimeTypes /mana/mime.types # MimeTypes C:/mana/mime.types # # mime.types file # MimeTypes /usr/local/gelojoh/mime.types # Alias # ----- # # Format: # Alias namaAlias /path/sebenar/yang/di/aliaskan # Alias namaAlias C:/Windows/punya/cara # # Ada sesetengah kes, kita nak web kita access directory # YANG BUKAN di bawah document root, mungkin directory # ni dekat drive/partition/directory lain. Daripada # kita "copy" segala isi bala ke dalam DocumentRoot, # baik guna Alias. Terutamanya images/ , yang penting # untuk Directory Indexing (bila user browse ke directory # yang tak ada DocumentIndex , Gelojoh akan paparkan # isi kandungan directory tersebut). Alias images /usr/local/gelojoh/images # Vhost # ----- # # Format: # Vhost hostname /path/mana # Vhost hostname_lain /path/lain/pula # # DocumentRoot /mana # ServerTag "Lala Server" # DocumentIndex index.html index.htm # DocumentIndex4 index.4.html # DocumentIndex6 index.6.html # # # Virtual host, satu ip yang ada banyak hostname resolution # boleh map setiap name utk. spesifik path / docroot yang khusus. # DocumentRoot sebagai default kalau dia tak jumpa mapping vhost # # Vhost cara pertama, satu baris sahaja: Vhost localhost /yada/yada Vhost 127.0.0.1 /what/ever Vhost ::1 /yeha/lala Vhost 3ffe:80d0:ff11:1337::1 /keke/kaka Vhost www.yadayada.org /haha/hehe # Vhost cara kedua, open/close tag DocumentRoot /kasumi DocumentRoot /multivhost # overwrite main/default ServerTag ;) ServerTag "MyASServer With MultiHost" DocumentIndex4 index.html DocumentIndex6 index.6.html