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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. * Disable pdf ranges fix for Adobe Reader since it uses regex and we
  6. don't always have pcre support
  7. * Change the network backend to writev since linux-sendfile fails on buildroot
  8. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  9. Signed-off-by: Simon Dawson <spdawson@gmail.com>
  10. [Gustavo: update for 1.4.37]
  11. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  12. 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
  13. --- lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf 2015-09-01 14:38:48.684673663 -0300
  14. +++ lighttpd-1.4.37/doc/config/conf.d/access_log.conf 2015-09-01 14:38:53.975855142 -0300
  15. @@ -9,7 +9,7 @@
  16. ##
  17. ## Default access log.
  18. ##
  19. -accesslog.filename = log_root + "/access.log"
  20. +accesslog.filename = log_root + "/lighttpd-access.log"
  21. ##
  22. ## The default format produces CLF compatible output.
  23. diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/config/lighttpd.conf
  24. --- lighttpd-1.4.37.orig/doc/config/lighttpd.conf 2015-09-01 14:38:48.684673663 -0300
  25. +++ lighttpd-1.4.37/doc/config/lighttpd.conf 2015-09-01 14:39:40.256442492 -0300
  26. @@ -13,8 +13,8 @@
  27. ## if you add a variable here. Add the corresponding variable in the
  28. ## chroot example aswell.
  29. ##
  30. -var.log_root = "/var/log/lighttpd"
  31. -var.server_root = "/srv/www"
  32. +var.log_root = "/var/log"
  33. +var.server_root = "/var/www"
  34. var.state_dir = "/var/run"
  35. var.home_dir = "/var/lib/lighttpd"
  36. var.conf_dir = "/etc/lighttpd"
  37. @@ -90,7 +90,7 @@
  38. ##
  39. ## Use IPv6?
  40. ##
  41. -server.use-ipv6 = "enable"
  42. +# server.use-ipv6 = "enable"
  43. ##
  44. ## bind to a specific IP
  45. @@ -101,8 +101,8 @@
  46. ## Run as a different username/groupname.
  47. ## This requires root permissions during startup.
  48. ##
  49. -server.username = "lighttpd"
  50. -server.groupname = "lighttpd"
  51. +server.username = "www-data"
  52. +server.groupname = "www-data"
  53. ##
  54. ## enable core files.
  55. @@ -112,7 +112,7 @@
  56. ##
  57. ## Document root
  58. ##
  59. -server.document-root = server_root + "/htdocs"
  60. +server.document-root = server_root
  61. ##
  62. ## The value for the "Server:" response field.
  63. @@ -138,7 +138,7 @@
  64. ##
  65. ## Path to the error log file
  66. ##
  67. -server.errorlog = log_root + "/error.log"
  68. +server.errorlog = log_root + "/lighttpd-error.log"
  69. ##
  70. ## If you want to log to syslog you have to unset the
  71. @@ -188,7 +188,7 @@
  72. ## sendfile - is recommended for small files.
  73. ## writev - is recommended for sending many large files
  74. ##
  75. -server.network-backend = "sendfile"
  76. +server.network-backend = "writev"
  77. ##
  78. ## As lighttpd is a single-threaded server, its main resource limit is
  79. @@ -311,9 +311,9 @@
  80. ## disable range requests for pdf files
  81. ## workaround for a bug in the Acrobat Reader plugin.
  82. ##
  83. -$HTTP["url"] =~ "\.pdf$" {
  84. - server.range-requests = "disable"
  85. -}
  86. +# $HTTP["url"] =~ "\.pdf$" {
  87. +# server.range-requests = "disable"
  88. +# }
  89. ##
  90. ## url handling modules (rewrite, redirect)