bffc2a8ed3703d7e499eb8377c859b8cd59fb3c4
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / lighttpd / 0001-Fix-default-config-file.patch
1 Modify the default lighttpd configuration file to have one a starting conf
2
3   * Changed the log path to /var/log and logs filenames
4   * Disable IPv6
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
9
10 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 Signed-off-by: Simon Dawson <spdawson@gmail.com>
12
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" )
17  ##
18  ## Default access log.
19  ##
20 -accesslog.filename          = log_root + "/access.log"
21 +accesslog.filename          = log_root + "/lighttpd-access.log"
22  
23  ##
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
28 @@ -13,8 +13,8 @@
29  ## if you add a variable here. Add the corresponding variable in the
30  ## chroot example aswell.
31  ##
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
40  ##
41  ## Use IPv6?
42  ##
43 -server.use-ipv6 = "enable"
44 +# server.use-ipv6 = "enable"
45  
46  ##
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. 
51  ##
52 -server.username  = "lighttpd"
53 -server.groupname = "lighttpd"
54 +server.username  = "www-data"
55 +server.groupname = "www-data"
56  
57  ## 
58  ## enable core files.
59 @@ -112,7 +112,7 @@ server.groupname = "lighttpd"
60  ##
61  ## Document root
62  ##
63 -server.document-root = server_root + "/htdocs"
64 +server.document-root = server_root
65  
66  ##
67  ## The value for the "Server:" response field.
68 @@ -138,7 +138,7 @@ server.pid-file = state_dir + "/lighttpd
69  ##
70  ## Path to the error log file
71  ##
72 -server.errorlog             = log_root + "/error.log"
73 +server.errorlog             = log_root + "/lighttpd-error.log"
74  
75  ##
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
80  ##
81 -server.network-backend = "linux-sendfile"
82 +server.network-backend = "writev"
83  
84  ##
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.
89  ##
90 -$HTTP["url"] =~ "\.pdf$" {
91 -  server.range-requests = "disable"
92 -}
93 +# $HTTP["url"] =~ "\.pdf$" {
94 +#  server.range-requests = "disable"
95 +# }
96  
97  ##
98  ## url handling modules (rewrite, redirect)