twiki启用pam

{Htpasswd}{FileName} = ''
{PasswordManager} = none
{LoginManager} = TWiki::LoginManager::ApacheLogin



%COPYRIGHT%
%INFO_CLASSIFICATION_CONFIDENTIAL%

mod_perl is an Apache module that greatly speeds up Perl CGI applications by pre-loading the Perl interpreter and compiling Perl scripts only once - it can be used with TWiki with no code changes. It is already used by some TWiki sites on both Unix/Linux and Windows. For more background, see http://perl.apache.org/. See also ModPerlProxied for configuration with the Advanced Extranet Server. (http://www.advx.org).

---++ Install mod_perl

%CODE{lang="c"}%
   yum -y install mod_perl
%ENDCODE%

   * You can generate the twiki.conf and mod_perl_startup.pl from the website: http://twiki.org/cgi-bin/view/TWiki.ApacheConfigGenerator. Put the twiki.conf to /etc/httpd/conf.d and mod_perl_startup.pl to /var/www/html/twiki/tools.

---++ Install PAM

   * pluggable authentication for Apache
      * The PAM authentication module implements Basic authentication on top of the Pluggable Authentication Module library. Due to constraints in the "Basic" authentication scheme (RFC 2617), it only supports username/password-style authentication. Due to the architecture of Apache, it only supports modules that can run as an unprivileged (non-root) user.That said, it works quite well for standard /etc/passwd authentication and, with a little bit of work, can support NIS and SMB auth and probably others. As all these are system password databases, it should be used in conjunction with SSL/TLS.
      * Install mod_auth_pam for TWiki. You can download the "mod_auth_pam" rpm package from internnet. Then you will find /etc/httpd/conf.d/auth_pam.conf.
      * cat auth_pam.conf
%CODE{lang="c"}%
LoadModule auth_pam_module modules/mod_auth_pam.so

LoadModule auth_sys_group_module modules/mod_auth_sys_group.so
%ENDCODE%

   * edit twiki.conf
      * Add
%CODE{lang="c"}%
AuthPAM _Enabled on

AuthPAM _FallThrough off
%ENDCODE%
Between
%CODE{lang="c"}%
<Directory "/var/www/html/twiki/bin">
%ENDCODE%
and
%CODE{lang="c"}%
AuthName
%ENDCODE%
      * Add
%CODE{lang="c++"}%
<FilesMatch "(attach|edit|manage|rename|save|upload|mail|logon|rest|.*auth).*">

require valid-user

</FilesMatch>
%ENDCODE%

After

   %CODE{lang="c"}%

<'FilesMatch "^(configure)$">

!SetHandler cgi-script

Order Deny,Allow

Deny from all

Allow from rat093 192.168.21.143 127.0.0.1

Require user timwang

Satisfy Any

</FilesMatch>

   %ENDCODE%

---++ You can review the details from attached files "twiki.conf" and "mod_perl_startup.pl".


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值