xref: /OK3568_Linux_fs/buildroot/package/lighttpd/0001-Fix-default-config-file.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunModify the default lighttpd configuration file to have one a starting conf
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun  * Changed the log path to /var/log and logs filenames
4*4882a593Smuzhiyun  * Disable IPv6
5*4882a593Smuzhiyun  * Do not setuid to a user that doesn't exist on the system
6*4882a593Smuzhiyun  * Change the network backend to writev since linux-sendfile fails on buildroot
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunSigned-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
9*4882a593SmuzhiyunSigned-off-by: Simon Dawson <spdawson@gmail.com>
10*4882a593Smuzhiyun[Gustavo: update for 1.4.37]
11*4882a593SmuzhiyunSigned-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
12*4882a593Smuzhiyun
13*4882a593Smuzhiyundiff -Nura lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf lighttpd-1.4.37/doc/config/conf.d/access_log.conf
14*4882a593Smuzhiyun--- lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf	2015-09-01 14:38:48.684673663 -0300
15*4882a593Smuzhiyun+++ lighttpd-1.4.37/doc/config/conf.d/access_log.conf	2015-09-01 14:38:53.975855142 -0300
16*4882a593Smuzhiyun@@ -9,7 +9,7 @@
17*4882a593Smuzhiyun ##
18*4882a593Smuzhiyun ## Default access log.
19*4882a593Smuzhiyun ##
20*4882a593Smuzhiyun-accesslog.filename          = log_root + "/access.log"
21*4882a593Smuzhiyun+accesslog.filename          = log_root + "/lighttpd-access.log"
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun ##
24*4882a593Smuzhiyun ## The default format produces CLF compatible output.
25*4882a593Smuzhiyundiff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/config/lighttpd.conf
26*4882a593Smuzhiyun--- lighttpd-1.4.37.orig/doc/config/lighttpd.conf	2015-09-01 14:38:48.684673663 -0300
27*4882a593Smuzhiyun+++ lighttpd-1.4.37/doc/config/lighttpd.conf	2015-09-01 14:39:40.256442492 -0300
28*4882a593Smuzhiyun@@ -13,8 +13,8 @@
29*4882a593Smuzhiyun ## if you add a variable here. Add the corresponding variable in the
30*4882a593Smuzhiyun ## chroot example aswell.
31*4882a593Smuzhiyun ##
32*4882a593Smuzhiyun-var.log_root    = "/var/log/lighttpd"
33*4882a593Smuzhiyun-var.server_root = "/srv/www"
34*4882a593Smuzhiyun+var.log_root    = "/var/log"
35*4882a593Smuzhiyun+var.server_root = "/var/www"
36*4882a593Smuzhiyun var.state_dir   = "/run"
37*4882a593Smuzhiyun var.home_dir    = "/var/lib/lighttpd"
38*4882a593Smuzhiyun var.conf_dir    = "/etc/lighttpd"
39*4882a593Smuzhiyun@@ -90,7 +90,7 @@
40*4882a593Smuzhiyun ##
41*4882a593Smuzhiyun ## Use IPv6?
42*4882a593Smuzhiyun ##
43*4882a593Smuzhiyun-server.use-ipv6 = "enable"
44*4882a593Smuzhiyun+# server.use-ipv6 = "enable"
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun ##
47*4882a593Smuzhiyun ## bind to a specific IP
48*4882a593Smuzhiyun@@ -101,8 +101,8 @@
49*4882a593Smuzhiyun ## Run as a different username/groupname.
50*4882a593Smuzhiyun ## This requires root permissions during startup.
51*4882a593Smuzhiyun ##
52*4882a593Smuzhiyun-server.username  = "lighttpd"
53*4882a593Smuzhiyun-server.groupname = "lighttpd"
54*4882a593Smuzhiyun+server.username  = "www-data"
55*4882a593Smuzhiyun+server.groupname = "www-data"
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun ##
58*4882a593Smuzhiyun ## Enable lighttpd to serve requests on sockets received from systemd
59*4882a593Smuzhiyun@@ -118,7 +118,7 @@
60*4882a593Smuzhiyun ##
61*4882a593Smuzhiyun ## Document root
62*4882a593Smuzhiyun ##
63*4882a593Smuzhiyun-server.document-root = server_root + "/htdocs"
64*4882a593Smuzhiyun+server.document-root = server_root
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun ##
67*4882a593Smuzhiyun ## The value for the "Server:" response field.
68*4882a593Smuzhiyun@@ -144,7 +144,7 @@
69*4882a593Smuzhiyun ##
70*4882a593Smuzhiyun ## Path to the error log file
71*4882a593Smuzhiyun ##
72*4882a593Smuzhiyun-server.errorlog             = log_root + "/error.log"
73*4882a593Smuzhiyun+server.errorlog             = log_root + "/lighttpd-error.log"
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun ##
76*4882a593Smuzhiyun ## If you want to log to syslog you have to unset the
77*4882a593Smuzhiyun@@ -195,7 +195,7 @@
78*4882a593Smuzhiyun ## sendfile       - is recommended for small files.
79*4882a593Smuzhiyun ## writev         - is recommended for sending many large files
80*4882a593Smuzhiyun ##
81*4882a593Smuzhiyun-server.network-backend = "sendfile"
82*4882a593Smuzhiyun+server.network-backend = "writev"
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun ##
85*4882a593Smuzhiyun ## As lighttpd is a single-threaded server, its main resource limit is
86