-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCaddyfile.frankenphp
More file actions
60 lines (47 loc) · 1.15 KB
/
Caddyfile.frankenphp
File metadata and controls
60 lines (47 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ddev-generated
# Adapted from https://github.com/php/frankenphp/blob/main/caddy/frankenphp/Caddyfile
#
# The Caddyfile is an easy way to configure FrankenPHP and the Caddy web server.
#
# https://frankenphp.dev/docs/config
# https://caddyserver.com/docs/caddyfile
{
skip_install_trust
servers {
trusted_proxies static private_ranges
}
{$CADDY_GLOBAL_OPTIONS}
frankenphp {
{$FRANKENPHP_CONFIG}
}
}
{$CADDY_EXTRA_CONFIG}
(common_config) {
root {$DDEV_APPROOT}/{$DDEV_DOCROOT}
encode zstd br gzip
{$CADDY_SERVER_EXTRA_DIRECTIVES}
}
:80 {
import common_config
@secure header X-Forwarded-Proto https
php_server @secure {
env HTTPS on
env SERVER_PORT 443
env REQUEST_SCHEME https
root {$DDEV_APPROOT}/{$DDEV_DOCROOT}
}
php_server {
root {$DDEV_APPROOT}/{$DDEV_DOCROOT}
}
}
:443 {
import common_config
tls /etc/ssl/certs/master.crt /etc/ssl/certs/master.key
php_server {
root {$DDEV_APPROOT}/{$DDEV_DOCROOT}
}
}
# As an alternative to editing the above site block, you can add your own site
# block files in the Caddyfile.d directory, and they will be included as long
# as they use the .caddyfile extension.
import Caddyfile.d/*.caddyfile