-
Notifications
You must be signed in to change notification settings - Fork 3
/
Caddyfile
56 lines (52 loc) · 1.17 KB
/
Caddyfile
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
{
email you@example.com
cert_issuer acme
acme_ca https://acme-v02.api.letsencrypt.org/directory
servers {
protocol {
experimental_http3
allow_h2c
}
max_header_size 16384
}
}
dbadmin.example.com {
log {
output file /var/log/caddy/dbadmin.log {
roll_size 20mb
roll_keep 2
roll_keep_for 6h
}
format console
level error
}
reverse_proxy adminer:8080
encode gzip
}
example.com {
log {
output file /var/log/caddy/wordpress.log {
roll_size 20mb
roll_keep 2
roll_keep_for 6h
}
format console
level error
}
root * /var/www/html
php_fastcgi wordpress:9000
file_server
encode gzip
#Cache
@cachedFiles {
path *.webp *.jpg *.jpeg *.png *.gif *.ico *.js *.css *.woff *.woff2 *.ttf
}
header @cachedFiles Cache-Control "public, max-age=604800, must-revalidate"
#Protect WP Directories
@disallowed {
path /xmlrpc.php
path *.sql
path /wp-content/uploads/*.php
}
rewrite @disallowed '/index.php'
}