参考:http://www.dokuwiki.org/tips:htaccessauth
在公司内部中,有时会使用基于Apache服务器的htaccess认证(HTTP Authentication)。那么怎样让DokuWiki使用htaccess作为认证方式呢?
# File: .htaccess AuthType Basic AuthName "DokuWiki" require valid-user
unzip htaccessauth.zip cp htaccess.class.php $dokuwiki_dir/inc/auth/ cp htusers.auth.php $dokuwiki_dir/conf/ ### Edit $dokuwiki_dir/conf/local.protected.php $conf['htaccess_defaultgrp'] = 'user'; $conf['htaccess_domain'] = “example.com”; if (isset($_SERVER['PHP_AUTH_USER']) && !isset($_SESSION[$conf['title']]['auth']['info'])) $_REQUEST['u'] = $_SERVER['PHP_AUTH_USER']; # other suggested setting $conf['useacl'] = 1; // this enables the ACL feature $conf['openregister'] = 0;