Caddyfile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 ^/local/?$
  39. to /local.php
  40. }
  41. rewrite {
  42. r ^/federated/?$
  43. to /federated.php
  44. }
  45. rewrite {
  46. r ^/notifications/?$
  47. to /notifications.php
  48. }
  49. rewrite {
  50. r ^/whotofollow/?$
  51. to /who_to_follow.php
  52. }
  53. rewrite {
  54. r ^/search/?$
  55. to /search_hash_tag.php
  56. }
  57. rewrite {
  58. r ^/search/users/?$
  59. to /search_user.php
  60. }
  61. rewrite {
  62. r ^/settings/?$
  63. to /settings_general.php
  64. }
  65. rewrite {
  66. r ^/settings/profile/?$
  67. to /settings_profile.php
  68. }
  69. rewrite {
  70. r ^/settings/appearance/?$
  71. to /settings_appearance.php
  72. }
  73. rewrite {
  74. r ^/@(.+)@(.+).([a-z]+)/?$
  75. to /user.php?user=@{1}@{2}.{3}
  76. }
  77. rewrite {
  78. r ^/@(.+)@(.+).([a-z]+)/status/(.+?)?$
  79. to /user.php?user=@{1}@{2}.{3}&status={4}
  80. }
  81. rewrite {
  82. r ^/@(.+)@(.+).([a-z]+)/media/?$
  83. to /user_only_media.php?user=@{1}@{2}.{3}
  84. }
  85. rewrite {
  86. r ^/@(.+)@(.+).([a-z]+)/with_replies/?$
  87. to /user_include_replies.php?user=@{1}@{2}.{3}
  88. }
  89. rewrite {
  90. r ^/@(.+)@(.+).([a-z]+)/followers/?$
  91. to /user_followers.php?user=@{1}@{2}.{3}
  92. }
  93. rewrite {
  94. r ^/@(.+)@(.+).([a-z]+)/following/?$
  95. to /user_following.php?user=@{1}@{2}.{3}
  96. }
  97. rewrite {
  98. r ^/@(.+)@(.+).([a-z]+)/favourites/?$
  99. to /user_favorite.php?user=@{1}@{2}.{3}
  100. }
  101. rewrite {
  102. r ^/avatars/original/missing.png$
  103. to /assets/images/missing.png
  104. }
  105. rewrite {
  106. r ^/headers/original/missing.png$
  107. to /assets/images/missing_header.png
  108. }
  109. rewrite {
  110. r ^/404/?$
  111. to /404.php
  112. }
  113. }