2 # Load the modules that we need
14 # Basic server configuration
16 server.username = "www-data"
17 server.groupname = "www-data"
18 server.pid-file = "/var/run/lighttpd.pid"
23 accesslog.filename = "/var/log/lighttpd/access.log"
24 server.errorlog = "/var/log/lighttpd/error.log"
27 # Allow munin to monitor the server's status
29 $HTTP["remoteip"] == "127.0.0.1" { status.status-url = "/server-status" }
32 # API 0.3 is long dead, so fail any attempt to access it without
33 # getting rails involved at all
35 $HTTP["url"] =~ "^/api/0.3/" { url.access-deny = ("") }
38 # IP blocked at SteveC's request as it was trying to download the
39 # history of every object in the database one at a time
41 $HTTP["remoteip"] == "143.210.16.160" { url.access-deny = ("") }
44 # Limit connections to 20 per IP address
46 evasive.max-conns-per-ip = 20
49 # Setup MIME type mapping
53 ".gif" => "image/gif",
54 ".html" => "text/html",
55 ".js" => "application/x-javascript",
56 ".png" => "image/png",
57 ".swf" => "application/x-shockwave-flash",
58 ".txt" => "text/plain"
62 # Serve static content from the rails public area ourselves
64 server.document-root = "/var/www/rails/public"
67 # Send everything else to the appropriate FastCGI server
69 server.error-handler-404 = "/dispatch.fcgi"
70 $HTTP["url"] =~ "^/api/" { server.error-handler-404 = "/dispatch.api" }
73 # Configure the FastCGI servers
77 ( "host" => "127.0.0.1", "port" => 8000, "check-local" => "disable" ),
78 ( "host" => "127.0.0.1", "port" => 8001, "check-local" => "disable" ),
79 ( "host" => "127.0.0.1", "port" => 8002, "check-local" => "disable" ),
80 ( "host" => "127.0.0.1", "port" => 8003, "check-local" => "disable" ),
81 ( "host" => "127.0.0.1", "port" => 8004, "check-local" => "disable" ),
82 ( "host" => "127.0.0.1", "port" => 8005, "check-local" => "disable" )
85 ( "host" => "127.0.0.1", "port" => 8006, "check-local" => "disable" ),
86 ( "host" => "127.0.0.1", "port" => 8007, "check-local" => "disable" ),
87 ( "host" => "127.0.0.1", "port" => 8008, "check-local" => "disable" )