无法跟踪 logtout
我在 Mac OS X 10.6.5/Apache2.0/wsgi 上设置 trac。
我制作了一个指向 trac 环境的 wsgi 文件(hir.wsgi),如下所示。
import os
os.environ['TRAC_ENV'] = '/Library/WebServer/Documents/trac/hir'
os.environ['PYTHON_EGG_CACHE'] = '/Library/WebServer/Documents/trac/hir/eggs'
import trac.web.main
application = trac.web.main.dispatch_request
Apacheconf文件添加如下。
ScriptAliasMatch ^/hir(.*) "/Library/WebServer/Documents/wsgi/scripts/hir.wsgi$1"
<Location '/hir'>
AuthType Basic
AuthName "Hir"
AuthUserFile /Library/WebServer/Documents/trac/hir/htpasswd
Require valid-user
</Location>
使用 htpasswd 命令我添加了 user1、user2。
重新启动 apache 后,我可以在提供我的 ID/密码后使用 user1 登录,但是我无法注销。 我删除了添加到 conf 文件中的行,但这一次,我无法登录并显示错误消息。
Trac Error
Authentication information not available.
我的 trac 设置有什么问题?或者这是 Safari/IE8 的缓存问题?
I setup trac on Mac OS X 10.6.5/Apache2.0/wsgi.
I made a wsgi file (hir.wsgi) that points to trac environment as follows.
import os
os.environ['TRAC_ENV'] = '/Library/WebServer/Documents/trac/hir'
os.environ['PYTHON_EGG_CACHE'] = '/Library/WebServer/Documents/trac/hir/eggs'
import trac.web.main
application = trac.web.main.dispatch_request
Apache conf file is added as follows.
ScriptAliasMatch ^/hir(.*) "/Library/WebServer/Documents/wsgi/scripts/hir.wsgi$1"
<Location '/hir'>
AuthType Basic
AuthName "Hir"
AuthUserFile /Library/WebServer/Documents/trac/hir/htpasswd
Require valid-user
</Location>
Using htpasswd command I added user1, user2.
After relaunching apache, I could login with user1 after giving my id/password, however I can't logout.
I removed the lines added to conf file, but this time, I can't login with an error message.
Trac Error
Authentication information not available.
What's wrong with my trac setup? Or is this a cache issue with Safari/IE8?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我将 IE8 与 Trac 一起使用时,我必须在注销后关闭所有打开的浏览器窗口。否则,某些内容仍然在内部缓存,Trac 认为我仍然登录。我在 Firefox 中没有这个问题。我还没有在 Safari 中尝试过,所以我无法对此发表评论。
将您的 Trac/Apache 配置恢复为最初的配置,并尝试在注销和登录之间关闭浏览器。清除浏览器缓存并删除任何与 Trac 相关的 cookie 可能会让您无需关闭窗口即可再次登录。
When I'm using IE8 with Trac, I have to close all open browser windows after logging out. Otherwise, something is still cached internally and Trac thinks I'm still logged in. I don't have that problem in Firefox. I haven't tried it in Safari, so I can't comment in that regard.
Set your Trac/Apache configuration back like you had it at first and try closing the browser between logout and login. Clearing the browser cache and deleting any Trac-related cookies might enable you to log in again without closing the window.