April 17, 2003

Apache

Apacheのベーシック認証をかけたりしたときのメモ書き
httpd.conf
Alias /**** "/****/****"

Options All
AllowOverride All

/****/****に.htaccessをおいて
AuthName "Please enter username and password"
AuthUserFile /usr/local/****/****/.htpasswd
AuthGroupFile /dev/null

require valid-user

と記述する

.htpasswdを作成する
htpasswd -c /usr/local/****/****/.htpasswd 作りたいユーザー名
-cオプションはもし.htpasswdがなかった場合は新規作成するオプション

Posted by keita at April 17, 2003 02:52 PM
Comments
Post a comment