# Example configuration for hosting brat using the Lighttpd # (http://www.lighttpd.net/) web server. # # Example usage: # # Adjust the settings in the MANDATORY section, and run lighttpd as: # # $ lighttpd -D -f lighttpd.conf # # With the default settings, this will make brat available at # http://localhost:8080/ # # Note: # The user running lighttpd (or the one specified in server.user when # started by a super-user) has to have sufficient permissions on brat # folders. # # # Author: Illes Solt # Version: 2011-08-21 ### MANDATORY SETTINGS # The path to brat base directory, see also config*.py server.document-root = BASE_DIR ### OPTIONAL # Default port is 80, requires super-user privileges. server.port = 8080 # Daemon files #server.errorlog = "/var/log/lighttpd/error.log" #server.pid-file = "/var/run/lighttpd.pid" # Setting a user different from the user running lighttpd requires super-user privileges. server.username = "www-data" server.groupname = "www-data" # Enable compresion of transmitted text files, may offer speed-up on slow networks. #server.modules += ( "mod_compress" ) #compress.cache-dir = "/var/cache/lighttpd/compress/" #compress.filetype = ( "text/javascript", "text/css", "text/html", "text/plain", "text/xml", "application/xhtml+xml", "image/svg+xml" ) ### UNDER THE HOOD cgi.assign = ( ".cgi" => "/usr/bin/python" ) server.modules += ( "mod_cgi" ) index-file.names = ( "index.html" ) static-file.exclude-extensions = ( ".fcgi", "~", ".cgi", ".py", ".pyc", ".htaccess", ".gitignore" ) # Mime type mappings mimetype.assign = ( ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".png" => "image/png", ".gif" => "image/gif", ".pdf" => "application/pdf", ".svg" => "image/svg+xml", ".xhtml" => "application/xhtml+xml", ".html" => "text/html", ".htm" => "text/html", ".xml" => "text/xml", ".txt" => "text/plain", ".js" => "text/javascript", ".css" => "text/css", ".ttf" => "font/ttf", ".zip" => "application/zip", ".tar" => "application/x-tar", ".gz" => "application/x-gzip", ".tar.gz" => "application/x-tgz", ".tgz" => "application/x-tgz", ".bz2" => "application/x-bzip", ".tbz" => "application/x-bzip-compressed-tar", ".tar.bz2"=> "application/x-bzip-compressed-tar", # make the default mime type application/octet-stream "" => "application/octet-stream", )