允许 Trac 中的匿名用户 (apache/mod_wsgi)
我已经安装了 trac,并且使用 apache2 和 mod_wsgi 运行得很好。然而,当用户尝试访问首页时,他们会收到登录信息。我已经尝试了几件事,但我尝试的所有事情要么一起禁用身份验证,要么不允许未经身份验证的用户查看该网站。这是我的 httpd.conf 文件的身份验证部分:
<Location '/'>
AuthType Basic
AuthName "Trac"
AuthUserFile /home/trac/.htpasswd
Require valid-user
</Location>
我几乎可以肯定解决方案位于 require 行中,但我已经耗尽了我的创造力。有什么想法吗?
编辑:我选择的答案效果很好。给出的链接没有有关将密码文件连接到系统的说明。
I have trac installed and running great using apache2 and mod_wsgi. However when ever a user tries to access even the front page they are greeted with a login. I've tried several things, but everything I try either disables the authentication all together or won't allow unauthenticated users to view the site. Here's the authentication section of my httpd.conf file:
<Location '/'>
AuthType Basic
AuthName "Trac"
AuthUserFile /home/trac/.htpasswd
Require valid-user
</Location>
I'm almost certain that the solution lies int the require line but I've exhausted my ow creativity. Any thoughts?
EDIT: The answer I selected works great. The link given doesn't have instructions on connecting the password file to the system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的记忆很模糊,但是当我遇到这个问题时,我找到的唯一解决方案是从 Apache 身份验证切换到 AccountManagerPlugin 。
My memory is hazy, but the only solution I found when I had this issue was switching to from Apache authentication to the AccountManagerPlugin.
您可以指定 apache 何时询问密码。
在 trac 中,当您选择“登录”时,它将打开站点:/trac_folder/login
因此,定义身份验证位置应该可以解决问题。
检查我的 trac.conf:
在您的文件中将:更改
为:
You can specify when apache should ask about password.
In trac when you select Login it will open site: /trac_folder/login
So defining location for authentication should do the trick.
Check my trac.conf:
In you file change:
to: