{"id":109,"date":"2012-01-25T10:58:05","date_gmt":"2012-01-25T08:58:05","guid":{"rendered":"http:\/\/www.melen.org\/u\/jan\/wp\/?p=109"},"modified":"2012-01-25T10:59:02","modified_gmt":"2012-01-25T08:59:02","slug":"apache-subversion-mod_dav_svn-configuration","status":"publish","type":"post","link":"https:\/\/www.melen.org\/u\/jan\/wp\/?p=109","title":{"rendered":"Apache &amp; Subversion mod_dav_svn configuration"},"content":{"rendered":"<p>First one should naturally install subversion and apache in to the system and while installing make sure that mod_dav option is enabled in apache package and that mod_dav_svn option is enabled in subversion.<\/p>\n<p>There is two ways to setup the mod_dav_svn with apache depending on whether you plan to have one or multiple repositories within single URI. For single repository the you should add in to httpd.conf the following:<\/p>\n<pre>\r\n## SVN WebDAV Repository Setup\r\n&lt;Location \/svn&gt;\r\n     DAV svn\r\n     SVNPath \/home\/svn\/repos\r\n     SVNIndexXSLT \"http:\/\/www.myservername.com\/svnindex.xsl\"\r\n     \r\n     # authenticating them valid ones\r\n     Satisfy All\r\n     Require valid-user\r\n     AuthType Basic\r\n     AuthName \"Subversion Repositories\"\r\n     AuthUserFile \/home\/svn\/access\/users\r\n&lt;\/Location&gt;\r\n<\/pre>\n<p>For multiple repositories add following in to httpd.conf:<\/p>\n<pre>\r\n## SVN WebDAV Repository Setup\r\n&lt;Location \/svn&gt;\r\n     DAV svn\r\n     SVNParentPath \/home\/svn\/repos\r\n     SVNIndexXSLT \"http:\/\/www.myservername.com\/svnindex.xsl\"\r\n     \r\n     # authenticating them valid ones\r\n     Satisfy All\r\n     Require valid-user\r\n     AuthType Basic\r\n     AuthName \"Subversion Repositories\"\r\n     AuthUserFile \/home\/svn\/access\/users\r\n&lt;\/Location&gt;\r\n<\/pre>\n<p>The default svnindex.xsl and svnindex.css can be found and copied from the subversion source package under subversion-&lt;VERSION-NUMBER&gt;\/tools\/xslt\/. <\/p>\n<p>Create the users using the htpasswd utility when adding the first user add -c after the htpasswd command in order to create the password file and for the following users you should remove the -c option:<\/p>\n<pre>\r\n# htpasswd \/home\/svn\/access\/users &lt;username&gt;\r\n<\/pre>\n<p>Building repository in the single repository configuration. The repository needs to be writable by the user or group to which the apache process belongs to. <\/p>\n<pre>\r\n# svnadmin create \/home\/svn\/repos\r\n# svn import \/home\/&lt;where_ever_you_have_initial_files&gt; \\\r\n    file:\/\/\/home\/svn\/repos -m \"initial import\"\r\n# cd \/home\/svn\r\n# chown -R www repos\r\n<\/pre>\n<p>Building repository in the multiple repository configuration. The repository needs to be writable by the user or group to which the apache process belongs to. <\/p>\n<pre>\r\n# svnadmin create \/home\/svn\/repos\/&lt;PROJECT_NAME&gt;\r\n# svn import \/home\/&lt;where_ever_you_have_initial_files&gt; \\ \r\n    file:\/\/\/home\/svn\/repos\/&lt;PROJECT_NAME&gt; -m \"initial import\"\r\n# cd \/home\/svn\/repos\r\n# chown -R www &lt;PROJECT_NAME&gt;\r\n<\/pre>\n<p>In the single repository configuration you can access the repository through web browser simply by writing in to the location bar the http:\/\/www.myservername.com\/svn, but in the multiple repository configuration you must also add the project name after e.g. http:\/\/www.myservername.com\/svn\/&lt;PROJECT_NAME&gt; simply accessing the parent directory will result in to permission denied page to displayed so listing of repositories is not possible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First one should naturally install subversion and apache in to the system and while installing make sure that mod_dav option is enabled in apache package and that mod_dav_svn option is enabled in subversion. There is two ways to setup the mod_dav_svn with apache depending on whether you plan to have one or multiple repositories within [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts\/109"}],"collection":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=109"}],"version-history":[{"count":12,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=\/wp\/v2\/posts\/109\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.melen.org\/u\/jan\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}