mod_auth_digest.soΥåȥåסȡ †.htaccess Ѥ Digest ǧ(ǧ) †Digest ǧڤäơ †Ū Apache ǧڤȤƤ Basic ǧڡʴǧڡˤͭ̾ǤǤBasic ǧڤǤȤꤵ桼̾ȥѥɤξϰŹ沽ƤʤʿʸǥͥåȥͥåȥήƤޤФ mod_auth_digest Ѥˤϥ桼̾ѥɡǧΰ̾ˤ MD5 ϥåͤѤǧڤԤȤߤǤñƤޤȡŹ沽줿桼ǧڤǤȤǤ .htaccess եǻꤹ硢ǧڤɬפȤǥ쥯ȥ̡Υ桼̾ȥѥɤäեɬפޤǤ Digest ǧڤǤϣĤΥեʣΥǥ쥯ȤФǧھޤȤƴ뤳ȤǤޤ(realm Ȥƥǥ쥯ȥ̤ޤˡ.htpasswd Τ褦ʥե뤬ǥ쥯ȥ֤ʤƤȤǤ⡢ԤˤȤäƤͭǤ ⡢ǤϤʤ⤢ޤǧѤ Basic ǧƱͤ .htaccess httpd.conf ǻꤵƤǥ쥯ȥ Options +Indexes Ȼꤷƥǥ쥯ȥɽ褦ˤʤäƤƤ⡢ǥꥹȤɽ뤳ȤϤޤ Apache ¦ɬפʻϡ †Apache ¦ɬפʤΤ mod_auth_digest ⥸塼뤬Ȥ߹ޤƤǤhttpd.conf ˼Τ褦ʹԤȤ߹ޤƤȻפäꤢޤѲǽǤ LoadModule auth_digest_module modules/mod_auth_digest.so ⤷ DSO (ưŪȤ߹ߥ⥸塼) Apache бƤʤƥ饳ѥ뤵Ƥ Apache ǤкƹۤɬפȤʤäƤޤޤȤϤꥻƥι⤤ Digest ǧڤ뤿Ǥ顢ϻʤȤƥѥ뤷ޤ礦ġġ Ȥˤ Digest ǧڤȤäƤߤ †ޤ Basic ǧڤꤷȤΤǤСDigest ǧڤؤƱ褦ʼꤹ뤳ȤޤBasic ǧڤǤ htpasswd ޥɤȤäƥ桼̾ȥѥɾե˺ޤФ Digest ǧڤǤ htdigest ޥɤȤäǧѤΥ桼̾ȥѥɤȤäϤ뤳ȤǤޤ ⤦ Digest ǧڤǰǰ realm ȤΤޤǧڤǥ쥯ȥˤĤ̾Τ褦ʤΤǤAuthName? ǻꤹ̾ AuthDigestFile? Ȥƻꤹѥɥե realm פʤǧڤޤĤޤ realm ǧڤ̤뤿ΤΡȤ˹ͤ뤳ȤǤޤ ϤƤȤˤƤߤޤ礦 ǧڤե֤ "/home/akane/digestpass" Ȥޤ.htpasswd Τ褦 Basic ǧڤƱͤ public_html ۲֤ΤϹޤʤȤޤʥФˤäƤȤƤޤ뤿Ǥˡ ǧڤ realm "BIOHAZARD LEVEL 4" Ȥޤ ǧڤ桼̾ "admin" ȤޤѥɤŬǤ ơޤ htdigest ޥɤȤäǧѤΥեޤhtdigest νϼΤ褦ʤΤǤ $ htdigest -c ǧڥե̾ "realm" 桼̾ ǻꤷƤߤȡ $ htdigest -c /home/akane/digestpass "BIOHAZARD LEVEL 4" admin Adding password for admin in realm BIOHAZARD LEVEL 4. New password: Re-type new password: Τ褦ˤʤޤ碌ƥѥϤƤޤΤǡƱѥɤޤcat ƤߤȡΤ褦ʴˤʤޤ $ cat digestpass admin:BIOHAZARD LEVEL 4:b28b9c50895dacaa50655efbcf01f8db ⤦ admin2 Ȥ桼ɲäޤ礦-c ץϽΤߤǤե뤬ʤп˥ե뤬Ƥоޤ-c ʤơ桼̾ admin2 ȤƥޥɤϤޤ $ htdigest /home/akane/digestpass "BIOHAZARD LEVEL 4" admin2 Adding user admin2 in realm BIOHAZARD LEVEL 4 New password: Re-type new password: $ cat digestpass admin:BIOHAZARD LEVEL 4:b28b9c50895dacaa50655efbcf01f8db admin2:BIOHAZARD LEVEL 4:ebc432e44550e90df6ec230de0c453ce Τ褦 admin, admin2 桼Ф "BIOHAZARD LEVEL 4" ȤФǧھޤ褦ˤʤޤ ʤߤ¾ξǧڤǤƱե˽ߤޤ㤨 "BIOHAZARD LEVEL 1" Ȥ guest 桼ФƤԤ $ htdigest /home/akane/digestpass "BIOHAZARD LEVEL 1" guest Adding user guest in realm BIOHAZARD LEVEL 1 New password: Re-type new password: Τ褦˻ꤹ뤳ȤǤޤcat ǥեΤȡ LEVEL 1 ȤФ guest 桼ǧھϿ줿Ȥʬޤ $ cat digestpass admin:BIOHAZARD LEVEL 4:b28b9c50895dacaa50655efbcf01f8db admin2:BIOHAZARD LEVEL 4:ebc432e44550e90df6ec230de0c453ce guest:BIOHAZARD LEVEL 1:7061b4a856732e77a93c9c2d0213cf33 Ƽ .htaccess ե֤Ǥ⤦־ľƤߤޤ ǧڤե֤ "/home/akane/digestpass" Ȥޤ ǧڤ realm "BIOHAZARD LEVEL 4" Ȥޤ ǧڤ桼̾ "admin" ȤޤѥɤŬǤ ǧڤ URL http://192.168.11.253/~akane/auth/ Υǥ쥯ȥ /home/akane/public_html/auth Ȥѥˤʤޤ .htaccess ե /home/akane/public_html/auth/.htaccess ֤ޤեȤϼΤ褦ʤΤǤ AuthType Digest AuthName "BIOHAZARD LEVEL 4" AuthDigestFile /home/akane/digestpass Require admin Ȥϥ֥饦饢Ƥߤޤ ⤷Internal Server Error ФƤޤäơ顼Ƥ /home/sakura/public_html/.htaccess: Invalid command 'AuthDigestFile', perhaps mis-spelled or defined by a module not included in the server configuration ǤС mod_auth_digest.soΥåȥåסȡȤơmod_auth_digest.so κƥѥ뤬ɬפǤ äѤäǧڲ̤ˤʤޤ͡ Internet Explorer 6 ǤβɽǤrealm = AuthName? ǻꤷ̾ǧڤ̾ȤɽޤȤ̤ɤ桼̾ȥѥɤȤäǧڤޤ ȤƤ Require valid-user λ꤬ȤʤʤޤȤȤƤ Internal Server Error ˤʤޤˤ⼡Τ褦ʥ顼Ĥ褦ˤʤޤ access to /~akane/auth/ failed, reason: unknown require directive:"valiid-user" ºݻƤߤȡۤȤ Basic ǧڤѤޤ⤷Ф Digest ǧڤбƤΤǤСǧڤǤ Digest ǧڤѤ褦ˤۤȰǤ礦 ޤʤ †顼 failed, reason: unknown require directive "xxxx" †.htaccess εҤʤ桼̾λ꤬ʤǽޤ ξϡޤưǧΤ Require valid-user Τ褦ˡǤե桼Ǥǧڤդ褦˽ƤߤƤߤɤǤȤϡ tail -f /usr/local/apache/logs/error_log ʤɤΤ褦ˤơ顼ꥢ륿İƤȡˤĤʤȻפޤ ͻ † |