19 lines
431 B
Caddyfile
19 lines
431 B
Caddyfile
localhost:8000 {
|
|
tls internal
|
|
# Add trailing slash for directory requests
|
|
@canonicalPath {
|
|
file {path}/index.php
|
|
not path */
|
|
}
|
|
redir @canonicalPath {http.request.orig_uri.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 {file_match.relative}
|
|
php_fastcgi 127.0.0.1:9000
|
|
file_server
|
|
}
|