Home > Archives > 2010-05

2010-05

Basic認証

.htaccessの作成


ディレクトリ単位でのアクセス制限


AuthUserFile (.htpasswdファイルへの絶対パス)
AuthGroupFile /dev/null
AuthName "Please enter your ID and password"
AuthType Basic
require valid-user


ページ単位でのアクセス制限


AuthUserFile (.htpasswdファイルへの絶対パス)
AuthGroupFile /dev/null
AuthName "Please enter your ID and password"
AuthType Basic
<Files (制限したいファイル名)>
require valid-user
</Files>


.htpasswdの作成



htpasswd -c .htpasswd user_name
New password: *****
Re-type new password: *****
Adding password for user user_name


参考サイト
.htaccess で特定のファイルのみにBasic認証を設定する方法
ベーシック認証を設定する(AuthType)

Home > Archives > 2010-05

Tag Cloud
Calendar
« 2010 年 5 月 »
M T W T F S S
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
RSS RSS

Return to page top