「Caddy」の版間の差分
Kusanaginoturugi (トーク | 投稿記録) (zh-hans:Caddy を追加) |
Kusanaginoturugi (トーク | 投稿記録) (→インストール: == Plugins == を追加) |
||
| 7行目: | 7行目: | ||
{{Pkg|caddy}} パッケージを[[インストール]]してください。 |
{{Pkg|caddy}} パッケージを[[インストール]]してください。 |
||
| + | |||
| + | == Plugins == |
||
| + | |||
| + | If you need more than the base version of caddy, you can use {{AUR|xcaddy-bin}} to customize your caddy server build. This is useful if you need the additional plugins for DNS challenge etc. |
||
| + | Alternatively, if a pre-built package, with the plugins you require, is already available you may choose to install those from [https://aur.archlinux.org/packages/?O=0&K=caddy AUR], for eg. {{AUR|caddy-cloudflare}} |
||
| + | |||
| + | For a custom caddy server build you can use xcaddy to build caddy with the necessary plugin modules: |
||
| + | |||
| + | $ xcaddy build [<caddy_version>] |
||
| + | [--output <file>] |
||
| + | [--with <module[@version][=replacement]>...] |
||
| + | |||
| + | For more information, see the [https://github.com/caddyserver/xcaddy xcaddy repository]. |
||
== 設定 == |
== 設定 == |
||
2021年12月9日 (木) 14:02時点における版
Caddy は自動的に HTTPS を使用する HTTP/2 対応のウェブサーバーです。
インストール
Plugins
If you need more than the base version of caddy, you can use xcaddy-binAUR to customize your caddy server build. This is useful if you need the additional plugins for DNS challenge etc. Alternatively, if a pre-built package, with the plugins you require, is already available you may choose to install those from AUR, for eg. caddy-cloudflareAUR
For a custom caddy server build you can use xcaddy to build caddy with the necessary plugin modules:
$ xcaddy build [<caddy_version>] [--output <file>] [--with <module[@version][=replacement]>...]
For more information, see the xcaddy repository.
設定
Caddy は Caddyfile という名前のプレーンテキストファイルを使って設定します。Caddyfile にはまずサイトのアドレスを記述して、それからディレクティブをいくつか書きます。
gzip 圧縮を使用し ../access.log にログを出力して localhost:2020 からアクセスできるサイトを記述した Caddyfile の例:
localhost:2020 gzip log ../access.log
使用方法
Caddy はページがあるディレクトリから通常ユーザーで実行できます。同一ディレクトリに Caddyfile が存在する必要があります:
$ caddy
もしくは Caddyfile を指定して実行することもできます:
$ caddy -conf="../path/to/Caddyfile"