-
Notifications
You must be signed in to change notification settings - Fork 0
/
Caddyfile
61 lines (55 loc) · 1.04 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
57
58
59
60
61
{
admin off
}
(wordpress_security) {
@disallowed {
not path /wp-includes/ms-files.php
path /wp-admin/includes/*.php
path /wp-includes/*.php
path /wp-config.php
path /wp-content/uploads/*.php
path /.user.ini
path /wp-content/debug.log
path *.sql
path *.sqlite
}
rewrite @disallowed /index.php
}
(static_header) {
@static {
file
path *.css *.js *.ico *.woff *.woff2
}
handle @static {
header Cache-Control "public, max-age=31536000"
}
@static-img {
file
path *.gif *.jpg *.jpeg *.png *.svg *.webp *.avif
}
handle @static-img {
header Cache-Control "public, max-age=31536000, immutable"
}
}
(header_remove) {
header -Link
header -Server
header -X-Pingback
header -X-Powered-By
}
:80 {
root * /data/www/default
encode zstd gzip
php_fastcgi unix//run/php/php7.4-fpm.sock
file_server {
index index.html
}
log {
output file /var/log/caddy/access.log {
roll_size 100mb
roll_keep 3
roll_keep_for 7d
}
}
}
import /etc/caddy/conf.d/*.conf