设置SVNListParentPath后浏览出现Forbidden
2007-12-27 09:21
344 查看
配置svn服务器为“多库”后(“单库”、“多库”的概念见http://bbs.iusesvn.com/thread-157-1-1.html),我们想让浏览器显示父目录列表,这样,访问者可以直观的看到在版本库根目录下有哪些版本库。配置时加入“SVNListParentPath on”,比如我的配置文件:
<Location /repos>
DAV svn
SVNListParentPath on
#SVNPath e:/svn/repos1
SVNParentPath e:/svn
# 访问控制策略
AuthzSVNAccessFile E:/usr/Apache2.2/bin/accesspolicy.conf
# 首先采取匿名,如有必要采取认证
Satisfy Any
Require valid-user
# 授权类型
AuthType Basic
# 认证时的提示信息,出现在对话框中
AuthName "UserFile Auth"
# 用户文件,存储帐号
AuthUserFile E:/usr/Apache2.2/bin/passwd.conf
</Location>
这时,如果我们在浏览器中输入“http://svn服务器IP/repos/repos1”(假设存在“repos1”版本库),那么我们可以自己看到“repos”版本库的列表。但是如果我们想查看版本库的根目录,看看有哪些版本库,输入“http://svn服务器IP/repos”,回车。却出现:
Forbidden
You don't have permission to access /repos on this server.
查看访问控制策略文件“accesspolicy.conf”,噢,原来没有给根目录加权限。添加权限,整个配置看起来如下:
[groups]
admin = indian
test = test
[/]
* = r
[repos1:/]
* = r
@admin = rw
[repos2:/]
@admin = rw
@test = r
* =
再次输入“http://svn服务器IP/repos”,回车,还是出现禁止访问的信息。问题出在“<Location /repos>”,把它改成“<Location /repos/>”,即在后面加个斜线“/”,问题得到解决。
参考资料:
《为何父文件夹不能看到版本库?》:我用svn中文论坛文章
《SVNListParentPath》:邮件列表
印第安
2007年12月27日2:12:40
<Location /repos>
DAV svn
SVNListParentPath on
#SVNPath e:/svn/repos1
SVNParentPath e:/svn
# 访问控制策略
AuthzSVNAccessFile E:/usr/Apache2.2/bin/accesspolicy.conf
# 首先采取匿名,如有必要采取认证
Satisfy Any
Require valid-user
# 授权类型
AuthType Basic
# 认证时的提示信息,出现在对话框中
AuthName "UserFile Auth"
# 用户文件,存储帐号
AuthUserFile E:/usr/Apache2.2/bin/passwd.conf
</Location>
这时,如果我们在浏览器中输入“http://svn服务器IP/repos/repos1”(假设存在“repos1”版本库),那么我们可以自己看到“repos”版本库的列表。但是如果我们想查看版本库的根目录,看看有哪些版本库,输入“http://svn服务器IP/repos”,回车。却出现:
Forbidden
You don't have permission to access /repos on this server.
查看访问控制策略文件“accesspolicy.conf”,噢,原来没有给根目录加权限。添加权限,整个配置看起来如下:
[groups]
admin = indian
test = test
[/]
* = r
[repos1:/]
* = r
@admin = rw
[repos2:/]
@admin = rw
@test = r
* =
再次输入“http://svn服务器IP/repos”,回车,还是出现禁止访问的信息。问题出在“<Location /repos>”,把它改成“<Location /repos/>”,即在后面加个斜线“/”,问题得到解决。
参考资料:
《为何父文件夹不能看到版本库?》:我用svn中文论坛文章
《SVNListParentPath》:邮件列表
印第安
2007年12月27日2:12:40
相关文章推荐
- 利用SVNListParentPath增加http浏览仓库根目录的功能
- 利用SVNListParentPath增加http浏览仓库根目录的功能
- 利用SVNListParentPath增加http浏览仓库根目录的功能
- 利用SVNListParentPath增加http浏览仓库根目录的功能
- SVNListParentPath on配置以及在根目录显示项目列表
- 连接SVN,出现如下错误:由于目标机器积极拒绝,无法连接Unable to connect to a repository at URL 禁止访问 (forbidden)
- rails 4.0 中使用 cap 发布的时候,出现 LD_LIBRARY_PATH 没有设置的问题 的解决办法
- Nginx 出现403 forbidden错误的设置方法!
- SVN+apache中SVNParentPath与SVNPath
- 【SVN】团队项目出现The project cannot be built until build path errors are resolved的解决方法与.classpath文件
- ubuntu环境下如何解决svn提交出现can't check path '/home/...'
- Mac下Nginx设置静态资源,出现403 Forbidden
- 在为属性为match_parent的控件设置权重时出现的反比例情况解析
- myeclipse中提交svn时过滤.project .settings .classpath等资源文件设置
- svn提交时出现svn: The log message is a pathname (was -F intended?); use '--force-log' to override
- svn下载项目的时候出现 Path to certificate
- eclipse下环境变量设置:eclipse导入工程出现 Unbound classpath variable Error
- unity打包出现Unable to list target platforms.Please make sure the android sdk path is correct.
- 嵌入式 Linux下svn co时提示错误解决办法 - 'PROPFIND of 'path': 403 Forbidden以及批量删除“.svn”
- SVN 设置多库浏览