-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
106 additions
and
69 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,43 @@ | ||
# Global options | ||
{ | ||
{$CADDY_GLOBAL_OPTIONS} | ||
|
||
frankenphp { | ||
#worker /path/to/your/worker.php | ||
{$FRANKENPHP_CONFIG} | ||
} | ||
|
||
# https://caddyserver.com/docs/caddyfile/directives#sorting-algorithm | ||
servers { | ||
timeouts { | ||
read_body 10s | ||
read_header 10s | ||
write 30s | ||
idle 60s | ||
} | ||
keepalive_interval 2m | ||
max_header_size 16KB | ||
trusted_proxies static private_ranges | ||
client_ip_headers X-Forwarded-For | ||
protocols h1 | ||
enable_full_duplex | ||
strict_sni_host on | ||
} | ||
|
||
order php_server before file_server | ||
order php before file_server | ||
order request_header before wp_cache | ||
} | ||
|
||
{$CADDY_EXTRA_CONFIG} | ||
|
||
## Need to set all hosts with port for the cloud. | ||
# You may not have the hostname being called due to dynamic IPs and load balancers. | ||
# Allowing all hosts on port 80 for health checks, local dev & cases where the hostname is unknown. | ||
:80 { | ||
@static { | ||
file | ||
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.webp *.woff *.woff2 | ||
path *.css *.eot *.gif *.ico *.jpeg *.jpg *.js *.otf *.png *.svg *.ttf *.webp *.woff *.woff2 | ||
} | ||
|
||
root * /var/www/html/ | ||
encode br zstd gzip | ||
|
||
|
||
# Include any extra directives | ||
{$CADDY_SERVER_EXTRA_DIRECTIVES} | ||
|
||
# PHP handling | ||
php_server | ||
} | ||
} |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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