我有一个 VPS,我正在尝试托管几个 SVN 项目。我希望 URL 路径是这样的:
http://svn.domain.com -> Welcome HTML page (at /var/www/svn.domain.com/httpdocs/index.php)
http://svn.domain.com/project1 -> Project 1 SVN Root
http://svn.domain.com/project2 -> Project 2 SVN Root
http://svn.domain.com/project3 -> Project 3 SVN Root
但是,使用下面的代码,第一件事(欢迎 HTML 页面)没有显示,因为 Location 块优先于 DocumentRoot。
将 Location 块设置为<Location /repos>
有效,但随后我的 URL 变为http://svn.domain.com/repos/project1
,这是我不喜欢的。
有什么建议么?
<VirtualHost *>
ServerName svn.domain.com
DocumentRoot /var/www/svn.domain.com/httpdocs
<Location />
DAV svn
SVNParentPath /var/svn
SVNIndexXSLT "/svnindex.xsl"
AuthzSVNAccessFile /var/svn/access
SVNListParentPath On
# try anonymous access first, resort to real
# authentication if necessary.
Satisfy Any
Require valid-user
# how to authenticate a user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/svn/passwd
</Location>
</VirtualHost>
<Directory /var/svn>
Allow from all
</Directory>