Modify the default lighttpd configuration file to have one a starting conf * Changed the log path to /var/log and logs filenames * Disable IPv6 * Do not setuid to a user that doesn't exist on the system * Change the network backend to writev since linux-sendfile fails on buildroot Signed-off-by: Maxime Ripard Signed-off-by: Simon Dawson [Gustavo: update for 1.4.37] Signed-off-by: Gustavo Zacarias diff -Nura lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf lighttpd-1.4.37/doc/config/conf.d/access_log.conf --- lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf 2015-09-01 14:38:48.684673663 -0300 +++ lighttpd-1.4.37/doc/config/conf.d/access_log.conf 2015-09-01 14:38:53.975855142 -0300 @@ -9,7 +9,7 @@ ## ## Default access log. ## -accesslog.filename = log_root + "/access.log" +accesslog.filename = log_root + "/lighttpd-access.log" ## ## The default format produces CLF compatible output. diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/config/lighttpd.conf --- lighttpd-1.4.37.orig/doc/config/lighttpd.conf 2015-09-01 14:38:48.684673663 -0300 +++ lighttpd-1.4.37/doc/config/lighttpd.conf 2015-09-01 14:39:40.256442492 -0300 @@ -13,8 +13,8 @@ ## if you add a variable here. Add the corresponding variable in the ## chroot example aswell. ## -var.log_root = "/var/log/lighttpd" -var.server_root = "/srv/www" +var.log_root = "/var/log" +var.server_root = "/var/www" var.state_dir = "/run" var.home_dir = "/var/lib/lighttpd" var.conf_dir = "/etc/lighttpd" @@ -90,7 +90,7 @@ ## ## Use IPv6? ## -server.use-ipv6 = "enable" +# server.use-ipv6 = "enable" ## ## bind to a specific IP @@ -101,8 +101,8 @@ ## Run as a different username/groupname. ## This requires root permissions during startup. ## -server.username = "lighttpd" -server.groupname = "lighttpd" +server.username = "www-data" +server.groupname = "www-data" ## ## Enable lighttpd to serve requests on sockets received from systemd @@ -118,7 +118,7 @@ ## ## Document root ## -server.document-root = server_root + "/htdocs" +server.document-root = server_root ## ## The value for the "Server:" response field. @@ -144,7 +144,7 @@ ## ## Path to the error log file ## -server.errorlog = log_root + "/error.log" +server.errorlog = log_root + "/lighttpd-error.log" ## ## If you want to log to syslog you have to unset the @@ -195,7 +195,7 @@ ## sendfile - is recommended for small files. ## writev - is recommended for sending many large files ## -server.network-backend = "sendfile" +server.network-backend = "writev" ## ## As lighttpd is a single-threaded server, its main resource limit is