Linux command
caddy 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start
caddy run
Serve
caddy file-server
Reverse
caddy reverse-proxy --from [example.com] --to [localhost:8080]
Validate
caddy validate
Reload
caddy reload
说明
caddy is a modern web server with automatic HTTPS. It obtains and renews TLS certificates automatically via Let's Encrypt, provides HTTP/2 and HTTP/3 support, and uses a simple configuration format. The server is designed for ease of use while maintaining high performance and security.
参数
- run
- Start Caddy server
- start
- Start Caddy in background
- stop
- Stop Caddy server
- reload
- Reload configuration
- validate
- Validate Caddyfile
- file-server
- Quick file server mode
- reverse-proxy
- Quick reverse proxy mode
- --config _file_
- Configuration file (default: Caddyfile)
- --adapter _name_
- Config adapter (caddyfile, json)
FAQ
What is the caddy command used for?
caddy is a modern web server with automatic HTTPS. It obtains and renews TLS certificates automatically via Let's Encrypt, provides HTTP/2 and HTTP/3 support, and uses a simple configuration format. The server is designed for ease of use while maintaining high performance and security.
How do I run a basic caddy example?
Run `caddy run` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does run do in caddy?
Start Caddy server