Caddyfile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. halcyon.domain.tld {
  2. tls user@domain.tld
  3. log /var/log/caddy/halcyon.log
  4. fastcgi / 127.0.0.1:9000 php
  5. root /opt/halcyon
  6. status 404 {
  7. /config.ini
  8. /.bat
  9. /.git
  10. /.ini
  11. /.sh
  12. /.svn
  13. /.txt
  14. /.tpl
  15. /.xml
  16. }
  17. rewrite {
  18. r ^/home/?$
  19. to /
  20. }
  21. rewrite {
  22. r ^/login/?$
  23. to /login/login.php
  24. }
  25. rewrite {
  26. r ^/auth/?$
  27. to /login/auth.php
  28. }
  29. rewrite {
  30. r ^/logout/?$
  31. to /login/logout.php
  32. }
  33. rewrite {
  34. r ^/terms/?$
  35. to /login/terms.php
  36. }
  37. rewrite {
  38. r ^/privacy/?$
  39. to /login/privacy.php
  40. }
  41. rewrite {
  42. r ^/imprint/?$
  43. to /login/imprint.php
  44. }
  45. rewrite {
  46. r ^/local/?$
  47. to /local.php
  48. }
  49. rewrite {
  50. r ^/federated/?$
  51. to /federated.php
  52. }
  53. rewrite {
  54. r ^/notifications/?$
  55. to /notifications.php
  56. }
  57. rewrite {
  58. r ^/whotofollow/?$
  59. to /who_to_follow.php
  60. }
  61. rewrite {
  62. r ^/direct/?$
  63. to direct.php
  64. }
  65. rewrite {
  66. r ^/lists/?$
  67. to lists.php
  68. }
  69. rewrite{
  70. r ^/lists/(\d+)/?$
  71. to lists_view.php?id={1}
  72. }
  73. rewrite{
  74. r ^/lists/(\d+)/add/?$
  75. to lists_add.php?id={1}
  76. }
  77. rewrite {
  78. r ^/search/?$
  79. to /search_hash_tag.php
  80. }
  81. rewrite {
  82. r ^/search/users/?$
  83. to /search_user.php
  84. }
  85. rewrite {
  86. r ^/settings/?$
  87. to /settings_general.php
  88. }
  89. rewrite {
  90. r ^/settings/profile/?$
  91. to /settings_profile.php
  92. }
  93. rewrite {
  94. r ^/settings/appearance/?$
  95. to /settings_appearance.php
  96. }
  97. rewrite {
  98. r ^/@(.+)@(.+).([a-z]+)/?$
  99. to /user.php?user=@{1}@{2}.{3}
  100. }
  101. rewrite {
  102. r ^/@(.+)@(.+).([a-z]+)/status/(.+?)?$
  103. to /user.php?user=@{1}@{2}.{3}&status={4}
  104. }
  105. rewrite {
  106. r ^/@(.+)@(.+).([a-z]+)/media/?$
  107. to /user_only_media.php?user=@{1}@{2}.{3}
  108. }
  109. rewrite {
  110. r ^/@(.+)@(.+).([a-z]+)/with_replies/?$
  111. to /user_include_replies.php?user=@{1}@{2}.{3}
  112. }
  113. rewrite {
  114. r ^/@(.+)@(.+).([a-z]+)/followers/?$
  115. to /user_followers.php?user=@{1}@{2}.{3}
  116. }
  117. rewrite {
  118. r ^/@(.+)@(.+).([a-z]+)/following/?$
  119. to /user_following.php?user=@{1}@{2}.{3}
  120. }
  121. rewrite {
  122. r ^/@(.+)@(.+).([a-z]+)/favourites/?$
  123. to /user_favorite.php?user=@{1}@{2}.{3}
  124. }
  125. rewrite {
  126. r ^/avatars/original/missing.png$
  127. to /assets/images/missing.png
  128. }
  129. rewrite {
  130. r ^/headers/original/missing.png$
  131. to /assets/images/missing_header.png
  132. }
  133. rewrite {
  134. r ^/404/?$
  135. to /404.php
  136. }
  137. }