5.1 基本認証 |
5.1.1 htpasswdによるユーザ登録
htpasswdコマンドを使い、ユーザを登録します。ユーザ名は任意です。サーバにアカウントを持つユーザ名である必要はありません。 ここでは"authtest"というユーザを登録します。パスワードファイルは"/etc/httpd/conf/passwd"ファイルと指定します。
5.1.2 httpd.conf
<Directory /var/www/html/secret/> Satisfy any AuthType Basic AuthName basicAuthTest AuthUserFile /etc/httpd/conf/passwd </Directory> |
home |index |previous |next |contents