trac的身份认证

今天发生奇怪的事情 用squid代理trac 他原始的登录方式就不起作用了 也不报错
域名了2天后来装了个插件 换了一种登录方式就好了哈哈哈
记录一下
修改apache的虚拟主机 把原来的身份认证的部分删除掉
[ccn lang="apache" tab_size="4" theme="blackboard" width="900" ]

ServerName trac.wc.wcv5.com
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /app01/htdocs/trac_wc/
PythonOption TracEnv /app01/htdocs/trac_wc/
PythonOption TracUriRoot /

Options FollowSymLinks
AllowOverride None
Order deny,allow
#Deny from all
Satisfy all

ErrorLog /app01/htdocs/trac_xm/log/error.trac.log

[/ccn]

装个模块给python
[ccn lang="apache" tab_size="4" theme="blackboard" width="900" ]
easy_install https://trac-hacks.org/svn/accountmanagerplugin/trunk
[/ccn]

然后修改trac的配置文件
[ccn lang="bash" tab_size="4" theme="blackboard" width="900" ]
[components]
trac.web.auth.LoginModule = disabled
acct_mgr.web_ui.LoginModule = enabled
acct_mgr.web_ui.RegistrationModule = disabled
acct_mgr.htfile.HtPasswdStore = enabled
[account-manager]
; configure the plugin to store passwords in the htpasswd format:
password_store = HtPasswdStore
; with Trac < 0.10 use this instead: password_format = htpasswd ; the file where user accounts are stored ; the webserver will need write permissions to this file ; and its parent folder password_file = /var/www/localhost/htdocs/trac_xm/conf/.htpasswd [/ccn] 这样squid就不会对trac的登录造成影响了 参考链接 http://trac-hacks.org/wiki/AccountManagerPlugin