我已经find了一些设置Subversion版本库的指南,并通过一个子域(在Apache中使用一个虚拟主机)使其可用,但由于某些原因无法正常工作。 这是迄今为止我所得到的:
使用新的VirtualHostconfigurationApache:
<VirtualHost *:80> ServerAdmin [email protected] ServerName svn.mydomain.com <location> DAV svn SVNPath /Volumes/Storage/Resources/Subversion/svn_repo </location> </VirtualHost>
现在我没有任何身份validation(保持简单,直到我得到这个工作)。
我错过了什么明显的? 如果没有,有什么想法/build议?
你需要创build你的htpasswd文件并告诉SVN。 这里是我在Centos 5.5上设置SVN的注意事项:
Install SVN # yum install mod_dav_svn subversion Create the SVN Config File # vi /etc/httpd/conf.d/subversion.conf Add the first repo to the file above <Location /domain.com> DAV svn SVNPath /var/www/svn/domain.com AuthType Basic AuthName "Subversion Repo" AuthUserFile /etc/svn-auth-conf Require valid-user </Location> Create the password file # htpasswd -cm /etc/svn-auth-conf yourusername Create another user # htpasswd -m /etc/svn-auth-conf anotherusername Create repository # svnadmin create /var/www/svn/domain.com Set Permissions # chown apache -R /var/www/svn
希望有所帮助!
我知道这是一个古老的问题,但我跑这个问题,我能够设置子域来承载本教程后面的所有存储库
http://dhruba.name/2011/05/23/installing-subversion-using-subdomain-on-apache-and-debian/
只要提到“SVNParentPath”,你应该input绝对path,例如:“/ var / www / svn /”,
我有一个类似的问题。
目录访问权是原因。 如果您不提供DocumentRoot
,则Apacheselect其默认的DocumentRoot
。 如果访问默认的DocumentRoot
被拒绝 – 那么SVN也被拒绝。
只需将您的VirtualHost中的DocumentRoot
设置为一个现有的空目录,并在<Directory>
部分中授予该目录的allow
权限。