server.document-root         = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file              = env.SRCDIR + "/tmp/lighttpd/lighttpd.pid"

## bind to port (default: 80)
server.port                 = 2048

## bind to localhost (default: all interfaces)
server.bind                = "localhost"
server.errorlog            = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"

server.force-lowercase-filenames = "enable"

server.dir-listing          = "enable"

server.modules              = ( 
				"mod_rewrite",
				"mod_setenv",
				"mod_secdownload",
			        "mod_access", 
				"mod_auth",
				"mod_status", 
				"mod_expire",
				"mod_redirect", 
#				"mod_cgi" 
				)

server.indexfiles           = ( "index.php", "index.html", 
                                "index.htm", "default.htm" )


######################## MODULE CONFIG ############################

mimetype.assign             = ( ".png"  => "image/png", 
                                ".jpg"  => "image/jpeg",
                                ".jpeg" => "image/jpeg",
                                ".gif"  => "image/gif",
                                ".html" => "text/html",
                                ".htm"  => "text/html",
                                ".pdf"  => "application/pdf",
                                ".swf"  => "application/x-shockwave-flash",
                                ".spl"  => "application/futuresplash",
                                ".txt"  => "text/plain",
                                ".tar.gz" =>   "application/x-tgz",
                                ".tgz"  => "application/x-tgz",
                                ".gz"   => "application/x-gzip",
				".c"    => "text/plain",
				".conf" => "text/plain" )

auth.backend                = "plain"
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"

auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"

$HTTP["host"] == "lowercase-auth" {
  auth.require             = ( "/image.jpg" => 
                                ( 
				  "method"  => "digest",
				  "realm"   => "download archiv",
				  "require" => "valid-user"
				)
                              )
}

$HTTP["host"] == "lowercase-deny" {
  url.access-deny             = ( ".jpg")
}

$HTTP["host"] == "lowercase-exclude" {
  static-file.exclude-extensions = ( ".jpg" )
}
