0001-Fix-default-config-file.patch 2.7 KB

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