Created
May 17, 2025 17:41
-
-
Save xacrimon/ab91152070860338cb43158ddde6c5b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
log default { | |
output stdout | |
format json | |
include admin.api | |
} | |
log access { | |
output file /data/caddy/log/access.log { | |
mode 600 | |
roll_size 100MiB | |
roll_uncompressed | |
roll_keep_for 168h | |
} | |
format json | |
exclude admin.api | |
} | |
metrics { | |
per_host | |
} | |
grace_period 15s | |
shutdown_delay 0s | |
email [email protected] | |
servers { | |
timeouts { | |
read_body 30m | |
read_header 15s | |
write 30m | |
idle 5m | |
} | |
keepalive_interval 15s | |
max_header_size 8KiB | |
log_credentials | |
enable_full_duplex | |
} | |
} | |
(site-cfg) { | |
request_body { | |
max_size 128KiB | |
} | |
encode { | |
zstd | |
gzip | |
minimum_length 1100 | |
} | |
@trailing_slash `!{path}.startsWith("/.within.website/") && path_regexp('trailing_slash', '^(.*)/$')` | |
rewrite @trailing_slash {re.trailing_slash.1} | |
handle /httpdebug { | |
reverse_proxy httpdebug:3000 { | |
header_up X-Http-Version {http.request.proto} | |
header_up X-Real-Ip {remote_host} | |
header_up X-Tls-Version {http.request.tls.version} | |
} | |
} | |
} | |
(proxy-stream-conf) { | |
flush_interval 5s | |
stream_timeout 24h | |
stream_close_delay 15s | |
} | |
(anubis-serve) { | |
@anubis path /.within.website/* /robots.txt /.well-known/robots.txt | |
handle @anubis { | |
reverse_proxy anubis:3000 { | |
import proxy-stream-conf | |
header_up X-Http-Version {http.request.proto} | |
header_up X-Real-Ip {remote_host} | |
header_up X-Tls-Version {http.request.tls.version} | |
transport http { | |
read_buffer 4KiB | |
write_buffer 4KiB | |
max_response_header 8KiB | |
dial_timeout 3s | |
dial_fallback_delay -1s | |
response_header_timeout 15s | |
expect_continue_timeout 15s | |
read_timeout 15s | |
write_timeout 15s | |
keepalive 2m | |
keepalive_idle_conns 1 | |
keepalive_idle_conns_per_host 0 | |
max_conns_per_host 2 | |
} | |
} | |
} | |
} | |
(anubis-auth) { | |
reverse_proxy anubis:3000 { | |
import proxy-stream-conf | |
method GET | |
rewrite /.within.website/x/cmd/anubis/api/check | |
header_up X-Http-Version {http.request.proto} | |
header_up X-Real-Ip {remote_host} | |
header_up X-Tls-Version {http.request.tls.version} | |
transport http { | |
read_buffer 4KiB | |
write_buffer 4KiB | |
max_response_header 8KiB | |
dial_timeout 3s | |
dial_fallback_delay 300ms | |
response_header_timeout 5s | |
expect_continue_timeout 5s | |
read_timeout 5s | |
write_timeout 5s | |
keepalive 2m | |
keepalive_idle_conns 4 | |
keepalive_idle_conns_per_host 0 | |
compression off | |
max_conns_per_host 4 | |
} | |
@bad status 4xx | |
handle_response @bad { | |
redir * /.within.website/?redir={uri} temporary | |
} | |
@good status 2xx | |
handle_response @good { | |
} | |
} | |
} | |
acrimon.net { | |
import site-cfg | |
respond "acrimon.net" | |
} | |
www.acrimon.net { | |
import site-cfg | |
redir https://acrimon.net{uri} temporary | |
} | |
seaforge.org { | |
import site-cfg | |
import anubis-serve | |
handle /metrics { | |
respond "unauthorized" 401 | |
} | |
handle { | |
import anubis-auth | |
reverse_proxy forgejo:3000 { | |
header_up X-Real-Ip {remote_host} | |
} | |
} | |
} | |
www.seaforge.org { | |
import site-cfg | |
redir https://seaforge.org{uri} temporary | |
} | |
goobers.lgbt { | |
import site-cfg | |
respond "get m0ggd" | |
} | |
www.goobers.lgbt { | |
import site-cfg | |
redir https://goobers.lgbt{uri} temporary | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment