[Home][Back][Next]

1.Webサーバの設定

# vi /etc/httpd/conf/httpd.conf
変更前 変更後
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all

# /etc/init.d/httpd reload
httpd を再読み込み中: [ OK ]

2..htpasswdファイルの作成

新規作成の場合
# htpasswd -c /etc/httpd/conf/.htpasswd ataru
New password:(パスワード)
Re-type new password:(パスワード)
Adding password for user ataru
追加の場合
# htpasswd /etc/httpd/conf/.htpasswd ataru
New password:(パスワード)
Re-type new password:(パスワード)
Adding password for user ataru

3.Webページパスワード制限の確認

# vi /home/ataru/web/01/.htaccess
AuthUserFile /etc/httpd/conf/.htpasswd
AuthGroupFile /dev/null
AuthName "secret page"
AuthType Basic
require valid-user

[Home][Back][Next]

Copyright (C) 2005 ataru