0001-Modify-the-default-lighttpd-configuration-file-to-ha.patch 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. From d9e1c9c4a95797c812dd4906ecbbc532ae459364 Mon Sep 17 00:00:00 2001
  2. From: Maxime Ripard <maxime.ripard@free-electrons.com>
  3. Date: Mon, 13 Dec 2021 22:07:17 +0100
  4. Subject: [PATCH] Modify the default lighttpd configuration file to have one a
  5. starting conf
  6. * Changed the log path to /var/log and logs filenames
  7. * Disable IPv6 (Dropped since 1.4.68)
  8. * Do not setuid to a user that doesn't exist on the system
  9. * 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>
  12. [Gustavo: update for 1.4.37]
  13. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  14. [Thomas: update for 1.4.69 - drop server.use-ipv6]
  15. Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
  16. ---
  17. doc/config/conf.d/access_log.conf | 2 +-
  18. doc/config/lighttpd.conf | 14 +++++++-------
  19. 2 files changed, 8 insertions(+), 8 deletions(-)
  20. diff --git a/doc/config/conf.d/access_log.conf b/doc/config/conf.d/access_log.conf
  21. index e685d437..92cff4f0 100644
  22. --- a/doc/config/conf.d/access_log.conf
  23. +++ b/doc/config/conf.d/access_log.conf
  24. @@ -9,7 +9,7 @@ server.modules += ( "mod_accesslog" )
  25. ##
  26. ## Default access log.
  27. ##
  28. -accesslog.filename = log_root + "/access.log"
  29. +accesslog.filename = log_root + "/lighttpd-access.log"
  30. ##
  31. ## The default format produces CLF compatible output.
  32. diff --git a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf
  33. index d45a284d..4e926d5a 100644
  34. --- a/doc/config/lighttpd.conf
  35. +++ b/doc/config/lighttpd.conf
  36. @@ -13,8 +13,8 @@
  37. ## if you add a variable here. Add the corresponding variable in the
  38. ## chroot example as well.
  39. ##
  40. -var.log_root = "/var/log/lighttpd"
  41. -var.server_root = "/srv/www"
  42. +var.log_root = "/var/log"
  43. +var.server_root = "/var/www"
  44. var.state_dir = "/run"
  45. var.home_dir = "/var/lib/lighttpd"
  46. var.conf_dir = "/etc/lighttpd"
  47. @@ -97,8 +97,8 @@ server.port = 80
  48. ## Run as a different username/groupname.
  49. ## This requires root permissions during startup.
  50. ##
  51. -server.username = "lighttpd"
  52. -server.groupname = "lighttpd"
  53. +server.username = "www-data"
  54. +server.groupname = "www-data"
  55. ##
  56. ## Enable lighttpd to serve requests on sockets received from systemd
  57. @@ -114,7 +114,7 @@ server.groupname = "lighttpd"
  58. ##
  59. ## Document root
  60. ##
  61. -server.document-root = server_root + "/htdocs"
  62. +server.document-root = server_root
  63. ##
  64. ## The value for the "Server:" response field.
  65. @@ -140,7 +140,7 @@ server.pid-file = state_dir + "/lighttpd.pid"
  66. ##
  67. ## Path to the error log file
  68. ##
  69. -server.errorlog = log_root + "/error.log"
  70. +server.errorlog = log_root + "/lighttpd-error.log"
  71. ##
  72. ## If you want to log to syslog you have to unset the
  73. @@ -187,7 +187,7 @@ include conf_dir + "/conf.d/debug.conf"
  74. ## and write(). Every modern OS provides its own syscall to help network
  75. ## servers transfer files as fast as possible
  76. ##
  77. -#server.network-backend = "sendfile"
  78. +server.network-backend = "writev"
  79. ##
  80. ## As lighttpd is a single-threaded server, its main resource limit is
  81. --
  82. 2.39.0