Skip to content

Commit a5fbabe

Browse files
authored
Update example.Caddyfile
1 parent 7baca47 commit a5fbabe

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

example.Caddyfile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22

33
http://localhost:8080 {
44
encode gzip
5-
file_server /plugins/*/assets/*
6-
file_server /assets/*
7-
php_fastcgi 127.0.0.1:9001 {
8-
try_files /index.php
5+
@static {
6+
path /assets/*
7+
path /plugins/*/assets/*
8+
}
9+
@forbiddenFiles {
10+
not path /assets/*
11+
not path /plugins/*/assets/*
12+
}
13+
respond @forbiddenFiles 404
14+
handle @static {
15+
file_server
16+
}
17+
handle {
18+
rewrite * /index.php
19+
php_fastcgi 127.0.0.1:9001
920
}
1021
}

0 commit comments

Comments
 (0)