mirror of
https://github.com/d0zingcat/ghost-docker.git
synced 2026-05-13 15:09:34 +00:00
61 lines
1.5 KiB
Caddyfile
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}
|
|
# }
|