新增wiki命令文件

This commit is contained in:
2026-04-14 16:02:50 +08:00
parent 65803c911d
commit c6e3d3c5db
485 changed files with 12578 additions and 396 deletions

47
wiki/concepts/Caddy.md Normal file
View File

@@ -0,0 +1,47 @@
---
title: "Caddy"
type: concept
tags: [caddy, reverse-proxy, https, web-server]
last_updated: 2026-04-13
---
## Definition
Caddy是现代化Web服务器自动提供HTTPS并支持反向代理。
## 核心特性
- 自动Let's Encrypt证书申请
- 自动HTTP→HTTPS重定向
- 支持反向代理和负载均衡
- 配置简洁
## 在家庭网络中的用途
- 反向代理内网服务到公网域名
- HTTPS终端处理
- 多域名统一管理
## Caddyfile配置示例
```caddy
n8n.ishenwei.online {
reverse_proxy 127.0.0.1:15678
}
nas.ishenwei.online {
reverse_proxy 127.0.0.1:15000
}
```
## 常用命令
```bash
# 验证配置
sudo caddy validate --config /etc/caddy/Caddyfile
# 重载配置
sudo systemctl reload caddy
# 重启服务
sudo systemctl restart caddy
```
## 相关文档
- [[通过VPS+内网反向代理实现域名访问内网穿透]]
- [[家庭网络环境概览 2026-04-03]]