Information


BASIC認証の設定方法

  •    2010年2月19日(金) 14:10 JST 閲覧件数 773
指定したディレクトリ(/var/www/html/hagepage)以下にBASIC認証をかける

 (1) パスワードファイル(.htpasswd)を新規作成
 
$ htpasswd -c .htpasswd hage
New password:
Re-type new password:
Adding password for user hage
 
 
(2) .htaccessファイルを新規作成
 
$ vi .htpasswd
AuthType Basic
AuthName "hage members only"
AuthUserFile /var/www/html/hagepage/.htpasswd
AuthGroupFile /dev/null

<Limit GET>
require user hage
</Limit>