leilukin-tumbleblog/includes/caddyfile.conf

28 lines
548 B
Plaintext

# Template to enable clean URLs for the Caddy web server v2.
#
# Usage:
#
# example.com {
# #...
# import filesystem/path/to/chyrp/caddyfile
# #...
# }
@admin {
path /{chyrp_path}/admin/*
file {
try_files {path} {path}/ /{chyrp_path}/admin/index.php
}
}
@chyrp {
path /{chyrp_path}/*
file {
try_files {path} {path}/ /{chyrp_path}/index.php
}
}
rewrite *.twig /{chyrp_path}/index.php
rewrite @admin {http.matchers.file.relative}
rewrite @chyrp {http.matchers.file.relative}