パスワード制限設定方法
httpd.conf
httpd.confに以下を登録
[AuthType Digestの場合]
<Directory パスワードを掛けたいディレクトリ> AuthType Digest AuthName NS-Library AuthDigestFile パスワードファイルをフルパスで指定 require valid-user </Directory>
[AuthType Basicの場合]
<Directory パスワードを掛けたいディレクトリ> AuthName Mailing_List AuthType Basic AuthUserFile パスワードファイルをフルパスで指定 require valid-user </Directory>
パスワードファイルの作り方
[AuthType Digestの場合]
htdigest [-c] <password-file> <realm> <user-name>
始めて作成する時には、-cが必要。
realmには、AuthName に指定した文字列を入れる。(上の例だと"NS-Library")
[AuthType Basicの場合]
htpasswd [-c] <password-file> <user-name>
例 htpasswd -c /etc/httpd/conf/passwd nstech
始めて作成する時には、-cが必要。