-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
58 lines (51 loc) · 939 Bytes
/
Caddyfile
File metadata and controls
58 lines (51 loc) · 939 Bytes
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
{
debug
}
(php) {
root * ./public/php
@fileExists file /{args[0]}.php
handle @fileExists {
rewrite * /{args[0]}.php
php_fastcgi unix//var/run/php/php-fpm.sock {
env HTTP_X_API_KEY {header.X-API-Key}
}
}
handle {
respond 404
}
}
(folder) {
root * ./public/{args[0]}
file_server
}
:8080 {
root * ./public/html
encode gzip zstd
handle_path /assets/* {
import folder assets
}
handle_path /css/* {
import folder css
}
handle /wares {
import php wares
}
handle /api/* {
import php {path}
}
handle_path /share/* {
import folder share
}
handle {
try_files {path}.html {path}/ {path}
file_server
}
handle_errors {
@notfound expression {http.error.status_code} == 404
rewrite @notfound /404.html
file_server
@forbidden expression {http.error.status_code} == 403
rewrite @forbidden /403.html
file_server
}
}