All pastes #173929 Raw Edit

Something

public text v1 · immutable
·published 2006-09-17 11:28 UTC
rendered paste body
#
# 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 8080 # IPv4 global address, semua interface/ip

#
# 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 NtahX-primental Web Server / Ruby 1.8.1 (i386-WinNT)"

# 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 d:\

# 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 D:\Gelojoh\gonjol\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 D:\Gelojoh\gonjol\images

# Vhost
# -----
#
# Format:
#        Vhost hostname /path/mana
#        Vhost hostname_lain /path/lain/pula
#        <Vhost hostname>
#          DocumentRoot /mana
#          ServerTag "Lala Server"
#          DocumentIndex index.html index.htm
#          DocumentIndex4 index.4.html
#          DocumentIndex6 index.6.html
#        </Vhost>
#
# 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: