# lighttpd configuration file # # use a it as base for lighttpd 1.0.0 and above # # $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $ ############ Options you really have to take care of #################### ## modules to load # at least mod_access and mod_accesslog should be loaded # all other module should only be loaded if really neccesary # - saves some time # - saves memory server.modules = ( #<<>> "mod_rewrite", # "mod_redirect", "mod_access", # "mod_auth", # "mod_status", #<<>> "mod_fastcgi", # "mod_simple_vhost", # "mod_evhost", # "mod_cgi", # "mod_compress", # "mod_ssi", # "mod_usertrack", # "mod_rrdtool", "mod_accesslog" ) ## a static document-root, for virtual-hosting take look at the ## server.virtual-* options #<<>> server.document-root = "/var/www/jeanjacques/test/public/" ## where to send error-messages to #<<>> server.errorlog = "/var/www/jeanjacques/test/lighttpd.error.log" # files to check for if .../ is requested server.indexfiles = ( "index.php", "index.html", "index.htm", "default.htm" ) --- SNIP --- #### accesslog module #<<>> accesslog.filename = "/var/www/jeanjacques/test/log/access.log" ## deny access the file-extensions # # ~ is for backupfiles from vi, emacs, joe, ... # .inc is often used for code includes which should in general not be part # of the document-root url.access-deny = ( "~", ".inc" ) ######### Options that are good to be but not neccesary to be changed ####### ## bind to port (default: 80) #<<1024) so your regular user can open the socket server.port = 8888 ## bind to localhost (default: all interfaces) #<<>> server.bind = "127.0.0.1" --- SNIP --- #<<>> ### only root can use these options # # chroot() to directory (default: no chroot() ) #server.chroot = "/" ## change uid to (default: don't care) #server.username = "wwwuser" ## change uid to (default: don't care) #server.groupname = "wwwgroup" #### compress module #compress.cache-dir = "/var/tmp/lighttpd/cache/compress/" #compress.filetype = ("text/plain", "text/html") #### fastcgi module ## read fastcgi.txt for more info #<<>> #<<>> #<<>> #<<>> fastcgi.server = ( ".fcgi" => ( "localhost" => ( "socket" => "/tmp/rails.socket", "bin-path" => "/var/www/jeanjacques/test/public/dispatch.fcgi" ) ), ( "localhost" => ( "socket" => "/tmp/rails1.socket", "bin-path" => "/var/www/jeanjacques/test/public/dispatch.fcgi" ) ), ( "localhost" => ( "socket" => "/tmp/rails2.socket", "bin-path" => "/var/www/jeanjacques/test/public/dispatch.fcgi" ) ), ( "localhost" => ( "socket" => "/tmp/rails3.socket", "bin-path" => "/var/www/jeanjacques/public/dispatch.fcgi" ) ), ( "localhost" => ( "socket" => "/tmp/rails4.socket", "bin-path" => "/var/www/jeanjacques/public/dispatch.fcgi" ) ), ".php" => ( "localhost" => ( "socket" => "/tmp/php-fcgi.socket", "bin-path" => "/usr/bin/php4-cgi" ) ) ) --- SNIP --- #### url handling modules (rewrite, redirect, access) # url.rewrite = ( "^/$" => "/server-status" ) # url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" ) #<<>> #<<>> #<<>> url.rewrite = ( "^/$" => "/dispatch.fcgi?controller=home&action=index2", "^/([\-_a-zA-Z0-9]+)/([\-_a-zA-Z0-9]+)/([\-_a-zA-Z0-9%]+)\??([\-_a-zA-Z0-9=&%]*)$" => "/dispatch.fcgi?controller=$1&action=$2&id=$3&$4", "^/([\-_a-zA-Z0-9]+)/([\-_a-zA-Z0-9]+)/?\??([\-_a-zA-Z0-9=&%]*)$" => "/dispatch.fcgi?controller=$1&action=$2&$3", "^/([\-_a-zA-Z0-9]+)/?\??([\-_a-zA-Z0-9=&%]*)$" => "/dispatch.fcgi?controller=$1&action=index&$2" ) -- SNIP ---