cheng's profile零碎的力量PhotosBlogListsMore Tools Help
    8/12/2009

    mod_auth_any module of Apache

    最近工作中需要重现一个超老的apache mod_auth_any模块的漏洞,配置这个模块费了好大劲,在luoluo的帮助下终于能用了。

    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
        AuthType Basic
        AuthAnyUserProg "/etc/httpd/conf/test.py"
        AuthName "test"
        require valid-user
    </Directory>

    test.py脚本在用户认证失败的时候,应该输出
    print "Authentication Error: xxxx"
    这样才会使web server拒绝掉用户的请求