2005-10-28 13:54:07 -04:00
|
|
|
# Default configuration file for the lighttpd web server
|
2005-11-07 12:45:53 -05:00
|
|
|
# Start using ./script/server lighttpd
|
2005-10-28 13:54:07 -04:00
|
|
|
|
2006-04-04 12:58:23 -04:00
|
|
|
server.bind = "0.0.0.0"
|
2005-10-28 13:54:07 -04:00
|
|
|
server.port = 3000
|
|
|
|
|
2006-03-29 22:38:15 -05:00
|
|
|
server.modules = ( "mod_rewrite", "mod_accesslog", "mod_fastcgi", "mod_compress", "mod_expire" )
|
2006-04-04 12:58:23 -04:00
|
|
|
|
2005-10-28 13:54:07 -04:00
|
|
|
server.error-handler-404 = "/dispatch.fcgi"
|
2006-04-27 20:00:50 -04:00
|
|
|
server.pid-file = CWD + "/tmp/pids/lighttpd.pid"
|
2006-02-18 23:05:27 -05:00
|
|
|
server.document-root = CWD + "/public/"
|
2005-10-28 13:54:07 -04:00
|
|
|
|
2006-02-12 12:41:53 -05:00
|
|
|
server.errorlog = CWD + "/log/lighttpd.error.log"
|
|
|
|
accesslog.filename = CWD + "/log/lighttpd.access.log"
|
2005-10-28 13:54:07 -04:00
|
|
|
|
|
|
|
url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
|
2006-03-29 22:38:15 -05:00
|
|
|
|
2006-03-28 19:14:05 -05:00
|
|
|
compress.filetype = ( "text/plain", "text/html", "text/css", "text/javascript" )
|
2006-03-29 22:38:15 -05:00
|
|
|
compress.cache-dir = CWD + "/tmp/cache"
|
|
|
|
|
2006-04-04 12:58:23 -04:00
|
|
|
expire.url = ( "/favicon.ico" => "access 3 days",
|
|
|
|
"/images/" => "access 3 days",
|
|
|
|
"/stylesheets/" => "access 3 days",
|
|
|
|
"/javascripts/" => "access 3 days" )
|
2006-03-29 22:38:15 -05:00
|
|
|
|
2005-10-28 13:54:07 -04:00
|
|
|
|
2005-10-28 16:09:52 -04:00
|
|
|
# Change *-procs to 2 if you need to use Upload Progress or other tasks that
|
|
|
|
# *need* to execute a second request while the first is still pending.
|
2006-04-04 12:58:23 -04:00
|
|
|
fastcgi.server = ( ".fcgi" => ( "localhost" => (
|
|
|
|
"min-procs" => 1,
|
|
|
|
"max-procs" => 1,
|
|
|
|
"socket" => CWD + "/tmp/sockets/fcgi.socket",
|
|
|
|
"bin-path" => CWD + "/public/dispatch.fcgi",
|
|
|
|
"bin-environment" => ( "RAILS_ENV" => "development" )
|
|
|
|
) ) )
|
2005-10-28 13:54:07 -04:00
|
|
|
|
|
|
|
mimetype.assign = (
|
|
|
|
".css" => "text/css",
|
2005-10-28 17:44:52 -04:00
|
|
|
".gif" => "image/gif",
|
2005-10-28 13:54:07 -04:00
|
|
|
".htm" => "text/html",
|
2005-10-28 17:44:52 -04:00
|
|
|
".html" => "text/html",
|
|
|
|
".jpeg" => "image/jpeg",
|
|
|
|
".jpg" => "image/jpeg",
|
2005-10-28 13:54:07 -04:00
|
|
|
".js" => "text/javascript",
|
2005-10-28 17:44:52 -04:00
|
|
|
".png" => "image/png",
|
|
|
|
".swf" => "application/x-shockwave-flash",
|
|
|
|
".txt" => "text/plain"
|
|
|
|
)
|
2006-03-01 21:56:26 -05:00
|
|
|
|
|
|
|
# Making sure file uploads above 64k always work when using IE or Safari
|
2006-03-02 22:21:13 -05:00
|
|
|
# For more information, see http://trac.lighttpd.net/trac/ticket/360
|
2006-03-01 21:56:26 -05:00
|
|
|
$HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" {
|
|
|
|
server.max-keep-alive-requests = 0
|
2006-03-02 22:21:13 -05:00
|
|
|
}
|