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