-
Notifications
You must be signed in to change notification settings - Fork 421
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
35 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"admin":{"listen":"0.0.0.0:2019"},"logging":{"logs":{"default":{"writer":{"filename":"/var/log/caddy.log","output":"file"},"exclude":["http.log.access.log1","http.log.access.log0"]},"log0":{"writer":{"filename":"/var/log/vanblog-access.log","output":"file"},"encoder":{"format":"json"},"include":["http.log.access.log0"]},"log1":{"writer":{"filename":"/var/log/vanblog-access.log","output":"file"},"encoder":{"format":"json"},"include":["http.log.access.log1"]}}},"apps":{"http":{"servers":{"srv0":{"listen":[":443"],"routes":[{"handle":[{"encodings":{"gzip":{},"zstd":{}},"handler":"encode","prefer":["zstd","gzip"]}]},{"group":"group38","match":[{"path":["/sitemap.xml"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/sitemap.xml","replace":"/sitemap/sitemap.xml"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/api/comment"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","strip_path_prefix":"/api"},{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group38","match":[{"path":["/feed.json"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/feed.json","replace":"/rss/feed.json"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/comment*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group38","match":[{"path":["/favicon*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/favicon","replace":"/static/img/favicon"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/static/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/custom/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/feed.xml"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/feed.xml","replace":"/rss/feed.xml"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/atom.xml"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/feed.xml","replace":"/rss/atom.xml"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/swagger*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/token*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group38","match":[{"path":["/oauth*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group38","match":[{"path":["/admin*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","strip_path_prefix":"/admin"}]},{"handle":[{"handler":"vars","root":"/app/admin"}]},{"handle":[{"handler":"rewrite","uri":"{http.matchers.file.relative}"}],"match":[{"file":{"try_files":["{http.request.uri.path}","/index.html"]}}]},{"handle":[{"handler":"file_server","hide":["./CaddyfileTemplate"]}]}]}]},{"group":"group38","match":[{"path":["/user*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group38","match":[{"path":["/rss/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/api/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group38","match":[{"path":["/ui*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group38","match":[{"path":["/db*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group38","match":[{"path":["/c/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3001"}]}]}],"tls_connection_policies":[{}],"logs":{"default_logger_name":"log1"}},"srv1":{"listen":[":80"],"routes":[{"handle":[{"encodings":{"gzip":{},"zstd":{}},"handler":"encode","prefer":["zstd","gzip"]}]},{"group":"group40","match":[{"path":["/sitemap.xml"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/sitemap.xml","replace":"/sitemap/sitemap.xml"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/api/comment"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","strip_path_prefix":"/api"},{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group40","match":[{"path":["/feed.json"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/feed.json","replace":"/rss/feed.json"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/comment*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group40","match":[{"path":["/favicon*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/favicon","replace":"/static/img/favicon"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/static/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/custom/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/feed.xml"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/feed.xml","replace":"/rss/feed.xml"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/atom.xml"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","uri_substring":[{"find":"/feed.xml","replace":"/rss/atom.xml"}]},{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/swagger*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/token*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group40","match":[{"path":["/oauth*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group40","match":[{"path":["/admin*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"rewrite","strip_path_prefix":"/admin"}]},{"handle":[{"handler":"vars","root":"/app/admin"}]},{"handle":[{"handler":"rewrite","uri":"{http.matchers.file.relative}"}],"match":[{"file":{"try_files":["{http.request.uri.path}","/index.html"]}}]},{"handle":[{"handler":"file_server","hide":["./CaddyfileTemplate"]}]}]}]},{"group":"group40","match":[{"path":["/user*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group40","match":[{"path":["/rss/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/api/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"group":"group40","match":[{"path":["/ui*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group40","match":[{"path":["/db*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","trusted_proxies":["192.168.0.0/16","172.16.0.0/12","10.0.0.0/8","127.0.0.1/8","fd00::/8","::1"],"upstreams":[{"dial":"127.0.0.1:8360"}]}]}]}]},{"group":"group40","match":[{"path":["/c/*"]}],"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3000"}]}]}]}]},{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"127.0.0.1:3001"}]}]}],"logs":{"default_logger_name":"log0"}}}},"tls":{"automation":{"policies":[{"issuers":[{"email":"VAN_BLOG_EMAIL","module":"acme"},{"email":"VAN_BLOG_EMAIL","module":"zerossl"}],"on_demand":true}],"on_demand":{"ask":"http://127.0.0.1:3000/api/admin/caddy/ask"}}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
|
||
部署 VanBlog 后,请使用浏览器打开 `http://<你的域名>/admin/init`,并按照指引完成初始化。具体设置项可以参考 [站点配置](/features/config.md)。 | ||
|
||
::: note | ||
你也可以直接访问博客地址,并点击导航栏右上角管理员按钮进入后台初始化页面。 | ||
|
||
|
||
::: tip | ||
|
||
如果你直接使用默认的 80 和 443 端口,并且不打算套反代, | ||
|
||
也可以直接访问博客地址,并点击导航栏右上角管理员按钮进入后台初始化页面。 | ||
直接访问 `https://<你的域名>/admin/init`,VanBlog 会自动为你访问的域名签发证书,并开启 HTTPS。 | ||
|
||
这个过程可能会比较慢,取决于域名解析验证的时长。 | ||
|
||
具体请参考 [HTTPS](/advanced/https.md)。 | ||
|
||
如果需要套反向代理,请参考 [反代](/reference/reverse-proxy.md)。 | ||
|
||
::: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters