FVN Tech Blog Coding or Programming in C#/PHP | Linux or Windows Server Backend | New Media | SNS | Misc …

25Oct/060

apache2.0.x -> apache2.2.x 的认证模块变化

Mars:/opt/trac# apache2ctl -M
……
auth_basic_module (shared)
authn_file_module (shared)
authz_host_module (shared)
authz_user_module (shared)
authz_svn_module (shared)
……
相对于2.0,2.2的身份和权限控制更加精细
当然这也是一大进步

刚刚升级到2.2的时候可能会不太习惯
原来的配置文件很可能出错
对于普通大众最常用的AuthType Basic + htpasswd格式密码文件来说
以下模块是需要加载的
auth_basic,用于basic方式认证
authn_file,提供基于文件的认证方式,其他还有dbm,dbd,ldap等。
在配置中加入AuthBasicProvider file启用这个module
由于这也是默认的Basic认证方式
所以也可以不写这行配置,和2.0配置文件兼容
authz_user,Require valid-user这样的配置需要这个module
加载了这些module之后基本就可以和以前一样工作了

authn是认证支持模块
共有authn_alias,authz_anon,authz_dbd,authz_dbm,authz_default,authz_file六个模块
具体用法可以查看官方网站的解释

authz是授权支持模块
共有authz_dbm,authz_default,authz_groupfile,authz_host,authz_owner,authz_user六个模块

authnz是认证和授权做在一起,只有一个authnz_ldap
auth_basic,然后用AuthBasicProvider ldap调用

另外,授权支持模块中
authz_host提供了Order allow,deny的基于主机名,IP或者环境变量认证
Order Allow,Deny
Allow from 10.10.1.0/24, feuvan.net
Deny from all

至于那个authz_svn是给svn认证用的。。
不知道是什么的就忽略我说的话吧
我就是在升级的时候svn和trac出错才来折腾的

Apache2 越来越高级配置越来越复杂
难怪那么多轻量级的应用转向 lighttpd 了
期待 lighttpd 1.5

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Tagged as: No Comments
29May/060

多个Project的trac/subversion/apache2 架设

cd /opt/repos
svnadmin create Akantos
svnadmin create test
chown -R www-data:www-data /opt/repos

cd /opt/trac
trac-admin /opt/repos/Akantos initenv
trac-admin /opt/repos/test initenv
chown -R www-data:www-data /opt/trac

moonlight:~# cat /etc/apache2/conf.d/trac.conf
Alias /trac/chrome/common /usr/share/trac/htdocs

Order allow,deny
Allow from all

ScriptAlias /trac /usr/share/trac/cgi-bin/trac.cgi

# SetEnv TRAC_ENV "/opt/trac/"
SetEnv TRAC_ENV_PARENT_DIR "/opt/trac"

# 设置Trac用户验证
AuthType Basic
AuthName "Mars Trac Server"
AuthUserFile /etc/apache2/trac.passwd
# trac.passwd文件用htpasswd2命令生成
Require valid-user

moonlight:~# cat /etc/apache2/mods-enabled/dav_svn.conf

DAV svn
SVNParentPath /opt/repos

AuthType Basic
AuthName "MicroInfo Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
AuthzSVNAccessFile /etc/apache2/dav_svn.authz

moonlight:~# cat /etc/apache2/dav_svn.authz
[groups]
manager = feuvan
[/]
@manager = rw
* =
[Akantos:/]

[test:/]
* = rw ]]>

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Pages

Recent Posts

Categories

Tags

apache baidu C# Debian dotNET economy gadget GMA Google hulu IE7 Intel jiwai lighttpd Linux Mobile mod_extforward mojiti nginx oscanner OVAL Parallel PHP phproxy politics proxy Python regsvr32 SNS squid subversion trac TV Vista Visual Studio Windows Live Windows Mobile WLM wordpress wow WTL wzdftpd XDebug XML Zend Framework

Archives

Meta

友情链接与广告

Free web proxy
Old friends:

NSClub: