lighttpd.conf 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. server.port = 443
  2. server.username = "http"
  3. server.groupname = "http"
  4. server.document-root = "/srv/http"
  5. server.errorlog = "/var/log/lighttpd/error.log"
  6. server.modules = ( "mod_fastcgi", "mod_compress", "mod_rewrite", "mod_openssl" )
  7. dir-listing.activate = "disable"
  8. ssl.engine = "enable"
  9. ssl.pemfile = "/etc/lighttpd/halcyon.pem"
  10. index-file.names = ( "index.html", "index.php" )
  11. mimetype.assign = (
  12. ".txt" => "text/plain",
  13. ".html" => "text/html",
  14. ".htm" => "text/html",
  15. ".css" => "text/css",
  16. ".js" => "application/x-javascript",
  17. ".jpg" => "image/jpeg",
  18. ".jpeg" => "image/jpeg",
  19. ".gif" => "image/gif",
  20. ".png" => "image/png",
  21. ".svg" => "image/svg+xml",
  22. "" => "application/octet-stream"
  23. )
  24. fastcgi.server = ( ".php" => ((
  25. "bin-path" => "/usr/bin/php-cgi",
  26. "socket" => "/tmp/php.socket"
  27. )))
  28. compress.allowed-encodings = ("bzip2", "gzip", "deflate")
  29. compress.filetype = ("application/x-javascript", "application/javascript", "text/javascript", "text/x-js", "text/css", "text/html", "text/plain")
  30. $HTTP["host"] == "halcyon.example.com" {
  31. server.document-root = "/srv/http/halcyon"
  32. url.rewrite = (
  33. "^/home/?$" => "/",
  34. "^/intent/toot/?$" => "/share.php",
  35. "^/login/?$" => "/login/login.php",
  36. "^/auth\/?(\?.*)/?$" => "/login/auth.php$1",
  37. "^/logout/?$" => "/login/logout.php",
  38. "^/terms/?$" => "/login/terms.php",
  39. "^/privacy/?$" => "/login/privacy.php",
  40. "^/imprint/?$" => "/login/imprint.php",
  41. "^/local/?$" => "/local.php",
  42. "^/federated/?$" => "/federated.php",
  43. "^/notifications/?$" => "/notifications.php",
  44. "^/bookmarks/?$" => "/bookmarks.php",
  45. "^/whotofollow/?$" => "/who_to_follow.php",
  46. "^/direct/?$" => "/direct.php",
  47. "^/instance/?$" => "/instance.php",
  48. "^/lists/?$" => "/lists.php",
  49. "^/lists/(\d+)/?$" => "/lists_view.php?id=$1",
  50. "^/lists/(\d+)/add/?$" => "/lists_add.php?id=$1",
  51. "^/search\/?(\?.*)/?$" => "/search_hash_tag.php$1",
  52. "^/search/users\/?(\?.*)/?$" => "/search_user.php$1",
  53. "^/settings/?$" => "/settings_general.php",
  54. "^/settings/profile/?$" => "/settings_profile.php",
  55. "^/settings/appearance/?$" => "/settings_appearance.php",
  56. "^/settings/filters/?$" => "/settings_filters.php",
  57. "^/settings/media/?$" => "/settings_media.php",
  58. "^/settings/followers/?$" => "/settings_accounts.php",
  59. "^/settings/mutes/?$" => "/settings_accounts.php",
  60. "^/settings/blocks/?$" => "/settings_accounts.php",
  61. "^/@(.+)@(.+)\.([a-z]+)/status/(\w+)\/?\??(.*)/?$" => "/user.php?user=@$1@$2\.$3&status=$4&$5",
  62. "^/@(.+)@(.+)\.([a-z]+)/media\/?\??(.*)/?$" => "/user_only_media.php?user=@$1@$2\.$3&$4",
  63. "^/@(.+)@(.+)\.([a-z]+)/with_replies\/?\??(.*)/?$" => "/user_include_replies.php?user=@$1@$2\.$3&$4",
  64. "^/@(.+)@(.+)\.([a-z]+)/followers\/?\??(.*)/?$" => "/user_followers.php?user=@$1@$2\.$3&$4",
  65. "^/@(.+)@(.+)\.([a-z]+)/following\/?\??(.*)/?$" => "/user_following.php?user=@$1@$2\.$3&$4",
  66. "^/@(.+)@(.+)\.([a-z]+)/favourites\/?\??(.*)/?$" => "/user_favorite.php?user=@$1@$2\.$3&$4",
  67. "^/@(.+)@(.+)\.([a-z]+)\/?\??(.*)/?$" => "/user.php?user=@$1@$2\.$3&$4",
  68. "^/avatars/original/missing.png$" => "/assets/images/missing.png",
  69. "^/headers/original/missing.png$" => "/assets/images/missing_header.png",
  70. "^/404/?$" => "/404.php"
  71. )
  72. }