server.modules = ( "mod_rewrite", "mod_redirect", # "mod_alias", "mod_access", # "mod_cml", # "mod_trigger_b4_dl", # "mod_auth", # "mod_status", # "mod_setenv", "mod_fastcgi", # "mod_proxy", "mod_simple_vhost", # "mod_evhost", # "mod_userdir", "mod_cgi", "mod_compress", # "mod_ssi", # "mod_usertrack", # "mod_expire", # "mod_secdownload", # "mod_rrdtool", "mod_accesslog" ) server.document-root = "/usr/httpd/htdocs" server.errorlog = "/usr/httpd/lighttpd1.error.log" index-file.names = ( "index.php", "index.html", "main.html", "main.htm" ) #mimetype mapping (...) accesslog.filename = "/usr/httpd/logs/access.log" url.access-deny = ( "~", ".inc" ) $HTTP["url"] =~ "\.pdf$" { server.range-requests = "disable" } ## bind to port (default: 80) server.port = 81 ## bind to localhost (default: all interfaces) server.bind = "192.168.10.3" ## error-handler for status 404 #server.error-handler-404 = "/error-handler.html" #server.error-handler-404 = "/error-handler.php" server.error-handler-404 = "/dispatch.fcgi" ## to help the rc.scripts #server.pid-file = "/var/run/lighttpd.pid" ###### virtual hosts ## ## If you want name-based virtual hosting add the next three settings and load ## mod_simple_vhost ## ## document-root = ## virtual-server-root + virtual-server-default-host + virtual-server-docroot ## or ## virtual-server-root + http-host + virtual-server-docroot ## simple-vhost.server-root = "/usr/httpd/htdocs" simple-vhost.document-root = "/cake/webroot" compress.cache-dir = "/tmp/lighttpd/cache/compress/" compress.filetype = ("text/plain", "text/html") url.rewrite-once = ( "/(.*)\.(.*)" => "$0", "/(css|files|img|js|stats)/" => "$0", "^/([^.]+)$" => "/index.php?url=$1" ) #url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" ) #### both rewrite/redirect support back reference to regex conditional using %n $HTTP["host"] =~ "^www\.(.*)" { url.redirect = ( "^/(.*)" => "http://%1/$1" ) } fastcgi.server = ( ".php" => (( "bin-path" => "/usr/local/bin/php", "socket" => "/tmp/php.socket", "max-procs" => 2, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "16", "PHP_FCGI_MAX_REQUESTS" => "10000" ), "bin-copy-environment" => ( "PATH", "SHELL", "USER" ), "broken-scriptfilename" => "enable" )))