-
Notifications
You must be signed in to change notification settings - Fork 419
/
CaddyfileTemplate
114 lines (109 loc) · 1.85 KB
/
CaddyfileTemplate
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
on_demand_tls {
ask http://127.0.0.1:3000/api/admin/caddy/ask
}
admin 0.0.0.0:2019
email VAN_BLOG_EMAIL
log {
output file /var/log/caddy.log
}
}
(h) {
trusted_proxies private_ranges
}
(van) {
encode zstd gzip
log {
output file /var/log/vanblog-access.log
format json
}
tls {
on_demand
}
handle /ui* {
reverse_proxy 127.0.0.1:8360 {
import h
}
}
handle /user* {
reverse_proxy 127.0.0.1:8360 {
import h
}
}
handle /token* {
reverse_proxy 127.0.0.1:8360 {
import h
}
}
handle /db* {
reverse_proxy 127.0.0.1:8360 {
import h
}
}
handle /comment* {
reverse_proxy 127.0.0.1:8360 {
import h
}
}
handle /oauth* {
reverse_proxy 127.0.0.1:8360 {
import h
}
}
handle /favicon* {
uri replace /favicon /static/img/favicon
reverse_proxy 127.0.0.1:3000
}
handle /static/* {
reverse_proxy 127.0.0.1:3000
}
handle /c/* {
reverse_proxy 127.0.0.1:3000
}
handle /custom/* {
reverse_proxy 127.0.0.1:3000
}
handle /feed.json {
uri replace /feed.json /rss/feed.json
reverse_proxy 127.0.0.1:3000
}
handle /feed.xml {
uri replace /feed.xml /rss/feed.xml
reverse_proxy 127.0.0.1:3000
}
handle /sitemap.xml {
uri replace /sitemap.xml /sitemap/sitemap.xml
reverse_proxy 127.0.0.1:3000
}
handle /atom.xml {
uri replace /feed.xml /rss/atom.xml
reverse_proxy 127.0.0.1:3000
}
handle /rss/* {
reverse_proxy 127.0.0.1:3000
}
handle /swagger* {
reverse_proxy 127.0.0.1:3000
}
handle /api/comment {
uri strip_prefix /api
reverse_proxy 127.0.0.1:8360 {
import h
}
}
handle /api/* {
reverse_proxy 127.0.0.1:3000
}
handle_path /admin* {
root * /app/admin
try_files {path} /index.html
file_server
}
reverse_proxy 127.0.0.1:3001
}
http:// {
import van
}
https:// {
import van
}