1
+ server.modules = (
2
+ "mod_indexfile",
3
+ "mod_access",
4
+ "mod_alias",
5
+ "mod_redirect",
6
+ )
7
+
8
+ server.document-root = "/var/www/html"
9
+ server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
10
+ server.errorlog = "/var/log/lighttpd/error.log"
11
+ server.pid-file = "/run/lighttpd.pid"
12
+ server.username = "www-data"
13
+ server.groupname = "www-data"
14
+ server.port = {{ server_port }}
15
+
16
+ # strict parsing and normalization of URL for consistency and security
17
+ # https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_http-parseoptsDetails
18
+ # (might need to explicitly set "url-path-2f-decode" = "disable"
19
+ # if a specific application is encoding URLs inside url-path)
20
+ server.http-parseopts = (
21
+ "header-strict" => "enable",# default
22
+ "host-strict" => "enable",# default
23
+ "host-normalize" => "enable",# default
24
+ "url-normalize-unreserved"=> "enable",# recommended highly
25
+ "url-normalize-required" => "enable",# recommended
26
+ "url-ctrls-reject" => "enable",# recommended
27
+ "url-path-2f-decode" => "enable",# recommended highly (unless breaks app)
28
+ #"url-path-2f-reject" => "enable",
29
+ "url-path-dotseg-remove" => "enable",# recommended highly (unless breaks app)
30
+ #"url-path-dotseg-reject" => "enable",
31
+ #"url-query-20-plus" => "enable",# consistency in query string
32
+ )
33
+
34
+ index-file.names = ( "index.php", "index.html" )
35
+ url.access-deny = ( "~", ".inc" )
36
+ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
37
+
38
+ compress.cache-dir = "/var/cache/lighttpd/compress/"
39
+ compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
40
+
41
+ # default listening port for IPv6 falls back to the IPv4 port
42
+ ## Use ipv6 if available
43
+ #include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
44
+ include_shell "/usr/share/lighttpd/create-mime.conf.pl"
45
+ include "/etc/lighttpd/conf-enabled/*.conf"
46
+
47
+ #server.compat-module-load = "disable"
48
+ server.modules += (
49
+ "mod_compress",
50
+ "mod_dirlisting",
51
+ "mod_staticfile",
52
+ )
0 commit comments