Caddyfile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 ^/search/?$
  63. to /search_hash_tag.php
  64. }
  65. rewrite {
  66. r ^/search/users/?$
  67. to /search_user.php
  68. }
  69. rewrite {
  70. r ^/settings/?$
  71. to /settings_general.php
  72. }
  73. rewrite {
  74. r ^/settings/profile/?$
  75. to /settings_profile.php
  76. }
  77. rewrite {
  78. r ^/settings/appearance/?$
  79. to /settings_appearance.php
  80. }
  81. rewrite {
  82. r ^/@(.+)@(.+).([a-z]+)/?$
  83. to /user.php?user=@{1}@{2}.{3}
  84. }
  85. rewrite {
  86. r ^/@(.+)@(.+).([a-z]+)/status/(.+?)?$
  87. to /user.php?user=@{1}@{2}.{3}&status={4}
  88. }
  89. rewrite {
  90. r ^/@(.+)@(.+).([a-z]+)/media/?$
  91. to /user_only_media.php?user=@{1}@{2}.{3}
  92. }
  93. rewrite {
  94. r ^/@(.+)@(.+).([a-z]+)/with_replies/?$
  95. to /user_include_replies.php?user=@{1}@{2}.{3}
  96. }
  97. rewrite {
  98. r ^/@(.+)@(.+).([a-z]+)/followers/?$
  99. to /user_followers.php?user=@{1}@{2}.{3}
  100. }
  101. rewrite {
  102. r ^/@(.+)@(.+).([a-z]+)/following/?$
  103. to /user_following.php?user=@{1}@{2}.{3}
  104. }
  105. rewrite {
  106. r ^/@(.+)@(.+).([a-z]+)/favourites/?$
  107. to /user_favorite.php?user=@{1}@{2}.{3}
  108. }
  109. rewrite {
  110. r ^/avatars/original/missing.png$
  111. to /assets/images/missing.png
  112. }
  113. rewrite {
  114. r ^/headers/original/missing.png$
  115. to /assets/images/missing_header.png
  116. }
  117. rewrite {
  118. r ^/404/?$
  119. to /404.php
  120. }
  121. }