Linux command
xcaddy 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Build Caddy with modules
xcaddy build --with [github.com/module]
Build specific version
xcaddy build [v2.7.0] --with [github.com/module]
Run with module
xcaddy run --with [github.com/module]
Multiple modules
xcaddy build --with [mod1] --with [mod2]
说明
xcaddy is a build tool for creating custom Caddy web server binaries with additional modules compiled in. It uses the Go toolchain to compile Caddy from source with the specified plugins included, producing a single binary with all desired functionality. The build command compiles a specific Caddy version with one or more modules, while the run command temporarily builds and runs Caddy with the specified modules for development and testing without producing a permanent binary. Multiple modules can be included using repeated --with flags.
参数
- build
- Build Caddy.
- run
- Run Caddy.
- --with _MODULE_
- Include module.
- --output _FILE_
- Output path.
- --replace _REPL_
- Go replace directive.
FAQ
What is the xcaddy command used for?
xcaddy is a build tool for creating custom Caddy web server binaries with additional modules compiled in. It uses the Go toolchain to compile Caddy from source with the specified plugins included, producing a single binary with all desired functionality. The build command compiles a specific Caddy version with one or more modules, while the run command temporarily builds and runs Caddy with the specified modules for development and testing without producing a permanent binary. Multiple modules can be included using repeated --with flags.
How do I run a basic xcaddy example?
Run `xcaddy build --with [github.com/module]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does build do in xcaddy?
Build Caddy.