2
1

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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. diff -Nurp a/doc/config/conf.d/access_log.conf b/doc/config/conf.d/access_log.conf
  11. --- a/doc/config/conf.d/access_log.conf 2010-07-11 18:01:32.000000000 +0100
  12. +++ b/doc/config/conf.d/access_log.conf 2012-07-21 19:37:58.453207990 +0100
  13. @@ -9,7 +9,7 @@ server.modules += ( "mod_accesslog" )
  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 -Nurp a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf
  22. --- a/doc/config/lighttpd.conf 2011-12-18 12:57:25.000000000 +0000
  23. +++ b/doc/config/lighttpd.conf 2012-07-21 19:40:45.281200552 +0100
  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 = "/var/run"
  33. var.home_dir = "/var/lib/lighttpd"
  34. var.conf_dir = "/etc/lighttpd"
  35. @@ -90,7 +90,7 @@ server.port = 80
  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 @@ server.use-ipv6 = "enable"
  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 core files.
  53. @@ -112,7 +112,7 @@ server.groupname = "lighttpd"
  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. @@ -138,7 +138,7 @@ server.pid-file = state_dir + "/lighttpd
  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. @@ -188,7 +188,7 @@ server.event-handler = "linux-sysepoll"
  70. ## linux-sendfile - is recommended for small files.
  71. ## writev - is recommended for sending many large files
  72. ##
  73. -server.network-backend = "linux-sendfile"
  74. +server.network-backend = "writev"
  75. ##
  76. ## As lighttpd is a single-threaded server, its main resource limit is
  77. @@ -311,9 +311,9 @@ url.access-deny = ( "~", ".i
  78. ## disable range requests for pdf files
  79. ## workaround for a bug in the Acrobat Reader plugin.
  80. ##
  81. -$HTTP["url"] =~ "\.pdf$" {
  82. - server.range-requests = "disable"
  83. -}
  84. +# $HTTP["url"] =~ "\.pdf$" {
  85. +# server.range-requests = "disable"
  86. +# }
  87. ##
  88. ## url handling modules (rewrite, redirect)