Digest認証を設定する
ApacheでDigest認証を設定してみたところ次のようなエラーが発生した。
Syntax error on line 128 of /etc/httpd/conf/httpd.conf: Invalid command 'AuthDigestFile', perhaps misspelled or defined by a module not included in the server configuration
何か読み込むモジュールが足りないのかと思って調べていたら、2.2から必要なモジュールとコンフィグの記述方法が変更されたらしい。
- Apache2.0の場合
- 必要なモジュール
- access_module
- auth_digest_module
- 必要なモジュール
-
- 認証部分の記述
- AuthType Digest
- AuthName realm
- AuthDigestFile passwd_file
- Require valid-user
- 認証部分の記述
- Apache2.2の場合
- 必要なモジュール
- auth_digest_module
- authn_file_module
- authz_user_module
- authz_owner_module
- 必要なモジュール
-
- 認証部分の記述
- AuthType Digest
- AuthName realm
- AuthDigestProvider file
- AuthUserFile passwd_file
- Require valid-user
- 認証部分の記述
- 認証用ファイルの作成方法は同じ
# htdigest -c passwd_file realm user_name