Files
ghost-docker/caddy/Caddyfile.example
Hannah Wolfe 9ef8319d83 Updated Caddyfile.example to clarify ActivityPub requirement (#37)
- ActivityPub only requires this redirect if you are using a www domain
2025-07-31 16:02:42 +01:00

61 lines
1.5 KiB
Caddyfile

{$DOMAIN} {
import snippets/Logging
# Traffic Analytics service
import snippets/TrafficAnalytics
# ActivityPub Service
import snippets/ActivityPub
# Default proxy everything else to Ghost
handle {
reverse_proxy ghost:2368
}
# Optional: Enable gzip compression
encode gzip
# Optional: Add security headers
import snippets/SecurityHeaders
}
# Separate admin domains
# To use a separate domain for Ghost Admin uncomment the block below (recommended)
# {$ADMIN_DOMAIN} {
# import snippets/Logging
#
# # Traffic Analytics service
# import snippets/TrafficAnalytics
#
# # ActivityPub Service
# import snippets/ActivityPub
#
# # Default proxy everything else to Ghost
# handle {
# reverse_proxy ghost:2368
# }
#
# # Optional: Enable gzip compression
# encode gzip
#
# # Optional: Add security headers
# import snippets/SecurityHeaders
# }
# Redirect www -> root domain
# To redirect the www variant of your domain to the non-www variant uncomment the 4 lines below
# Note: You must have DNS setup correctly for both domains for this to work
# www.{$DOMAIN} {
# import snippets/Logging
# redir https://{$DOMAIN}{uri}
# }
# Redirect root -> www domain
# To redirect the non-www variant of your domain to the www variant uncomment the 4 lines below and change CHANGE_ME to your root domain
# Note: You must have DNS setup correctly for both domains for this to work
# When using ActivityPub with a www. domain, you must enable this redirect for ActivityPub to work correctly
# CHANGE_ME {
# import snippets/Logging
# redir https://{$DOMAIN}{uri}
# }