1 Modify the default lighttpd configuration file to have one a starting conf
3 * Changed the log path to /var/log and logs filenames
5 * Do not setuid to a user that doesn't exist on the system
6 * Disable pdf ranges fix for Adobe Reader since it uses regex and we
7 don't always have pcre support
8 * Change the network backend to writev since linux-sendfile fails on buildroot
10 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 Signed-off-by: Simon Dawson <spdawson@gmail.com>
13 diff -Nurp a/doc/config/conf.d/access_log.conf b/doc/config/conf.d/access_log.conf
14 --- a/doc/config/conf.d/access_log.conf 2010-07-11 18:01:32.000000000 +0100
15 +++ b/doc/config/conf.d/access_log.conf 2012-07-21 19:37:58.453207990 +0100
16 @@ -9,7 +9,7 @@ server.modules += ( "mod_accesslog" )
18 ## Default access log.
20 -accesslog.filename = log_root + "/access.log"
21 +accesslog.filename = log_root + "/lighttpd-access.log"
24 ## The default format produces CLF compatible output.
25 diff -Nurp a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf
26 --- a/doc/config/lighttpd.conf 2011-12-18 12:57:25.000000000 +0000
27 +++ b/doc/config/lighttpd.conf 2012-07-21 19:40:45.281200552 +0100
29 ## if you add a variable here. Add the corresponding variable in the
30 ## chroot example aswell.
32 -var.log_root = "/var/log/lighttpd"
33 -var.server_root = "/srv/www"
34 +var.log_root = "/var/log"
35 +var.server_root = "/var/www"
36 var.state_dir = "/var/run"
37 var.home_dir = "/var/lib/lighttpd"
38 var.conf_dir = "/etc/lighttpd"
39 @@ -90,7 +90,7 @@ server.port = 80
43 -server.use-ipv6 = "enable"
44 +# server.use-ipv6 = "enable"
47 ## bind to a specific IP
48 @@ -101,8 +101,8 @@ server.use-ipv6 = "enable"
49 ## Run as a different username/groupname.
50 ## This requires root permissions during startup.
52 -server.username = "lighttpd"
53 -server.groupname = "lighttpd"
54 +server.username = "www-data"
55 +server.groupname = "www-data"
59 @@ -112,7 +112,7 @@ server.groupname = "lighttpd"
63 -server.document-root = server_root + "/htdocs"
64 +server.document-root = server_root
67 ## The value for the "Server:" response field.
68 @@ -138,7 +138,7 @@ server.pid-file = state_dir + "/lighttpd
70 ## Path to the error log file
72 -server.errorlog = log_root + "/error.log"
73 +server.errorlog = log_root + "/lighttpd-error.log"
76 ## If you want to log to syslog you have to unset the
77 @@ -188,7 +188,7 @@ server.event-handler = "linux-sysepoll"
78 ## linux-sendfile - is recommended for small files.
79 ## writev - is recommended for sending many large files
81 -server.network-backend = "linux-sendfile"
82 +server.network-backend = "writev"
85 ## As lighttpd is a single-threaded server, its main resource limit is
86 @@ -311,9 +311,9 @@ url.access-deny = ( "~", ".i
87 ## disable range requests for pdf files
88 ## workaround for a bug in the Acrobat Reader plugin.
90 -$HTTP["url"] =~ "\.pdf$" {
91 - server.range-requests = "disable"
93 +# $HTTP["url"] =~ "\.pdf$" {
94 +# server.range-requests = "disable"
98 ## url handling modules (rewrite, redirect)