-
Notifications
You must be signed in to change notification settings - Fork 9
/
lighttpd.conf
91 lines (70 loc) · 2.46 KB
/
lighttpd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Example configuration for hosting stav 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 stav 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 stav
# folders.
#
#
# Author: Illes Solt <illes solt gmail com>
# Version: 2011-08-21
### MANDATORY SETTINGS
# The path to stav 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",
)