refer to http://www.atmarkit.co.jp/flinux/rensai/apache11/apache11b.html

memo

Text base basic auther

  1. add new account

  2. [/usr/root]# htpasswd /password file's directory/.htpasswd guest
    New password:********
    Re-type new password:********
    Adding password for user guest

  3. GROUP file

  4. admin:kato sato saito
    operator:kaneko tobashi
    user:takama nakaya iwakura hasebe imura
    guest:guest

  5. access file(httpd.conf pert4)

  6. <Directory "/apach document root/directory/">
    AuthUserFile /password file's directory/.htpasswd
    AuthGroupFile /dev/null
    AuthName "Please Enter Your Password"
    AuthType Basic
    Require valid-user
    </Directory>

DB base Basic Auther

  1. access file

  2. <Directory "/apach document root/directory/">
    Auth_PG_host DB server address or host name
    Auth_PG_port DBMS port number
    Auth_PG_database DB name
    Auth_PG_user db user
    Auth_PG_pwd password
    Auth_PG_pwd_table table name
    Auth_PG_uid_field user name field
    Auth_PG_pwd_field passwd field
    AuthName "Please Enter Your Password"
    Authtype Basic
    <Limit POST GET>
    require valid-user
    </Limit>
    <Directory>