Files
frankenphp/testdata/Caddyfile
Kévin Dunglas 8e136d0d25 feat: implement flush() (#90)
* feat: implement flush()

* add tests
2022-11-09 00:56:00 +01:00

35 lines
544 B
Caddyfile

{
debug
frankenphp {
#worker ./phpinfo.php
}
}
http:// {
log
route {
root * .
# Add trailing slash for directory requests
@canonicalPath {
file {path}/index.php
not path */
}
redir @canonicalPath {path}/ 308
# If the requested file does not exist, try index files
@indexFiles file {
try_files {path} {path}/index.php index.php
split_path .php
}
rewrite @indexFiles {http.matchers.file.relative}
# FrankenPHP!
@phpFiles path *.php
php @phpFiles
encode zstd gzip
file_server
respond 404
}
}