Created
April 11, 2022 06:23
-
-
Save delfick/67f0f23ddb9eccd98c8bbd7c7e47f68a to your computer and use it in GitHub Desktop.
This file contains 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
╭─ 16:23:12 ~/Projects/Opensource/caddy/cmd/caddy cmd-fmt-diff ✔ 1.17 | |
╰─ cat /Users/stephenm/Projects/pc-internal/cloud-bex-dev/developers/cloud/website/portal/tools/runtime_config/Caddyfile | |
{ | |
admin off | |
auto_https off | |
supervisor { | |
php-fpm -p . -c . -y fpm.conf -F { | |
redirect_stdout stderr | |
redirect_stderr stderr | |
} | |
} | |
log { | |
format json { | |
level_key "severity" | |
level_format "upper" | |
time_format "rfc3339_nano" | |
} | |
} | |
} | |
:8087 { | |
@trailing-slash { | |
path_regexp dir (.+)/$ | |
} | |
rewrite @trailing-slash {re.dir.1} | |
root * ../../webserver/portal | |
try_files {path} {path}.php {path}/index.php =404 | |
php_fastcgi unix/../../runtime/fpm.sock { | |
# php-fpm takes a few seconds the first time | |
lb_try_duration 5s | |
} | |
log { | |
output {$CADDY_LOG_OUTPUT} | |
format jsonselect "{severity:level} {timestamp:ts} {logName:logger} {httpRequest>requestMethod:request>method} {httpRequest>protocol:request>proto} {httpRequest>status:status} {httpRequest>responseSize:size} {httpRequest>userAgent:request>headers>User-Agent>[0]} {httpRequest>requestUrl:request>uri}" "{httpRequest>referrer:request>headers>Referer>[0]}" { | |
level_format "upper" | |
time_format "rfc3339_nano" | |
} | |
} | |
encode zstd gzip | |
handle_errors { | |
@404 { | |
expression {http.error.status_code} == 404 | |
} | |
rewrite @404 /not-found.php | |
reverse_proxy @404 unix/../../runtime/fpm.sock { | |
transport fastcgi { | |
split .php | |
} | |
} | |
} | |
} | |
╭─ 16:23:15 ~/Projects/Opensource/caddy/cmd/caddy cmd-fmt-diff ✔ 1.17 | |
╰─ ./caddy fmt -diff /Users/stephenm/Projects/pc-internal/cloud-bex-dev/developers/cloud/website/portal/tools/runtime_config/Caddyfile | |
{ | |
admin off | |
auto_https off | |
supervisor { | |
php-fpm -p . -c . -y fpm.conf -F { | |
redirect_stdout stderr | |
redirect_stderr stderr | |
} | |
} | |
log { | |
format json { | |
level_key "severity" | |
level_format "upper" | |
time_format "rfc3339_nano" | |
} | |
} | |
} | |
:8087 { | |
@trailing-slash { | |
path_regexp dir (.+)/$ | |
} | |
rewrite @trailing-slash {re.dir.1} | |
root * ../../webserver/portal | |
try_files {path} {path}.php {path}/index.php =404 | |
php_fastcgi unix/../../runtime/fpm.sock { | |
# php-fpm takes a few seconds the first time | |
lb_try_duration 5s | |
} | |
log { | |
output {$CADDY_LOG_OUTPUT} | |
format jsonselect "{severity:level} {timestamp:ts} {logName:logger} {httpRequest>requestMethod:request>method} {httpRequest>protocol:request>proto} {httpRequest>status:status} {httpRequest>responseSize:size} {httpRequest>userAgent:request>headers>User-Agent>[0]} {httpRequest>requestUrl:request>uri}" "{httpRequest>referrer:request>headers>Referer>[0]}" { | |
level_format "upper" | |
time_format "rfc3339_nano" | |
} | |
} | |
encode zstd gzip | |
handle_errors { | |
@404 { | |
expression {http.error.status_code} == 404 | |
} | |
rewrite @404 /not-found.php | |
reverse_proxy @404 unix/../../runtime/fpm.sock { | |
transport fastcgi { | |
split .php | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment