Caddy プラグイン(plugins)を追加する手順

Caddy プラグイン(plugins)を追加する手順

Caddyのプラグイン(plugins)を追加する手順を記述してます。サイトにアクセスして、コードを生成して実行すればインストールは可能です。

環境

  • OS  CentOS Linux release 7.7.1908 (Core)
  • サーバー さくらのクラウド
  • Caddy 1.0.4

プラグイン追加

こちらのサイトにアクセスします。

「Add plugins」をクリックして、インストールしたいプラグインを選択します。
※ここでは「http.ipfilter」を選択してます。

実行コマンドが生成されるのでコピーします。

後は、マシン上で生成されたコマンドを実行するだけプラグインのインストールは完了です。

curl https://getcaddy.com | bash -s personal http.ipfilter

<出力結果>
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7647  100  7647    0     0  10131      0 --:--:-- --:--:-- --:--:-- 10141

インストールしたプラグインを確認してみます。

caddy -plugins

<出力結果>
Server types:
  http

Caddyfile loaders:
  short
  flag
  default

Other plugins:
  http.basicauth
  http.bind
  http.browse
  http.errors
  http.expvar
  http.ext
  http.fastcgi
  http.gzip
  http.header
  http.index
  http.internal
  http.ipfilter

http.ipfilterが追加されていることが確認できます。