forked from Mereithhh/vanblog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CaddyfileTemplateLocal
110 lines (105 loc) · 1.83 KB
/
CaddyfileTemplateLocal
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
{
auto_https disable_redirects
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* {
reverse_proxy 127.0.0.1:3002
}
reverse_proxy 127.0.0.1:3001
}
:80, :443 {
import van
}