<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Webdav on Details...</title>
    <link>https://www.deepreflect.net/tags/webdav/</link>
    <description>Recent content in Webdav on Details...</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Copyright © 2003 - 2026 Leonardo Rizzi</copyright>
    <lastBuildDate>Tue, 30 Jun 2026 03:28:29 +0200</lastBuildDate>
    <atom:link href="https://www.deepreflect.net/tags/webdav/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Configuring subversion access over HTTP/DAV</title>
      <link>https://www.deepreflect.net/2009/03/29/configuring-subversion-access-over-httpdav/</link>
      <pubDate>Sun, 29 Mar 2009 12:53:15 +0000</pubDate>
       <guid isPermaLink="false">http://blog.deepreflect.net/?p=446</guid> 
      <description>&lt;ul&gt;
&lt;li&gt;Creating the repository&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have not created any Subversion repositories yet, you can create one with svnadmin:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# svnadmin create ~/my-repository&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Adding mod_dav_svn to your httpd&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# a2enmod mod\_dav\_svn&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you plan to use fine-grained permissions, load mod_authz_svn.so as well:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# a2enmod mod_authz_svn&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Configuring access to repositories&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;HTTP access to your repositories is defined using a &lt;code&gt;&amp;lt;Location&amp;gt;&lt;/code&gt; section in your httpd.conf.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;Location /myproject&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DAV svn
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;SVNPath /home/myself/myrepos/myproject
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AuthType Basic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AuthName &amp;#34;My project&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AuthUserFile /home/myself/private/myproject.pw
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Order deny,allow
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;LimitExcept GET PROPFIND OPTIONS REPORT&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Require valid-user
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/LimitExcept&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/Location&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This entry would grant read-only access to everyone and write access to every user AuthUserFile. You can use the htpasswd utility to create or update this file, as described here.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<ul>
<li>Creating the repository</li>
</ul>
<p>If you have not created any Subversion repositories yet, you can create one with svnadmin:</p>
<p><code># svnadmin create ~/my-repository</code></p>
<p>Adding mod_dav_svn to your httpd</p>
<p><code># a2enmod mod\_dav\_svn</code></p>
<p>If you plan to use fine-grained permissions, load mod_authz_svn.so as well:</p>
<p><code># a2enmod mod_authz_svn</code></p>
<ul>
<li>Configuring access to repositories</li>
</ul>
<p>HTTP access to your repositories is defined using a <code>&lt;Location&gt;</code> section in your httpd.conf.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>&lt;Location /myproject&gt;
</span></span><span style="display:flex;"><span>DAV svn
</span></span><span style="display:flex;"><span>SVNPath /home/myself/myrepos/myproject
</span></span><span style="display:flex;"><span>AuthType Basic
</span></span><span style="display:flex;"><span>AuthName &#34;My project&#34;
</span></span><span style="display:flex;"><span>AuthUserFile /home/myself/private/myproject.pw
</span></span><span style="display:flex;"><span>Order deny,allow
</span></span><span style="display:flex;"><span>&lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;
</span></span><span style="display:flex;"><span>Require valid-user
</span></span><span style="display:flex;"><span>&lt;/LimitExcept&gt;
</span></span><span style="display:flex;"><span>&lt;/Location&gt;
</span></span></code></pre></div><p>This entry would grant read-only access to everyone and write access to every user AuthUserFile. You can use the htpasswd utility to create or update this file, as described here.</p>
<p>The next entry grants read/write access to users in the AuthUserFile, and no access to anyone else.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>&lt;Location /myproject&gt;
</span></span><span style="display:flex;"><span>DAV svn
</span></span><span style="display:flex;"><span>SVNPath /home/myself/myrepos/myproject
</span></span><span style="display:flex;"><span>AuthType Basic
</span></span><span style="display:flex;"><span>AuthName &#34;My project&#34;
</span></span><span style="display:flex;"><span>AuthUserFile /home/myself/private/myproject.pw
</span></span><span style="display:flex;"><span>Order deny,allow
</span></span><span style="display:flex;"><span>Require valid-user
</span></span><span style="display:flex;"><span>&lt;/Location&gt;
</span></span></code></pre></div><p>The previous examples all define access on a per-repository basis. It is also possible to grant access from specific users to specific areas of the repository, using fine-grained permissions.</p>
<ul>
<li>Testing the repository</li>
</ul>
<p>Using either a remote Subversion client or the standard svn command from your shell, you can generate your working copy of the repository with the checkout command. If you are accessing public data over a read-only account, you can use a standard http URL:</p>
<p><code># svn co http://your-domain/myproject/</code></p>
<p>If you are accessing private data or using a read/write account, make sure to use an https URL:</p>
<p><code># svn co https://your-domain/myproject/</code></p>
<p>The contents of public repositories are also accessible from a web browser. Keep in mind that search engines will try to index any public data, so you may want to use a robots.txt file.</p>
<ul>
<li>Using fine-grained permissions (optional)</li>
</ul>
<p>You can allow or deny specific users read/write privileges on specific items within a repository using AuthzSVNAccessFile. If you use this directive, make sure the mod_authz_svn module is loaded.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>&lt;Location /repos&gt;
</span></span><span style="display:flex;"><span>DAV svn
</span></span><span style="display:flex;"><span>SVNPath /home/myself/myrepos
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span># Access Control via the authz module.
</span></span><span style="display:flex;"><span>AuthzSVNAccessFile /home/myself/private/myrepos.acl
</span></span><span style="display:flex;"><span># Anonymous access is allowed. Prompt as needed.
</span></span><span style="display:flex;"><span>Satisfy Any
</span></span><span style="display:flex;"><span>Require valid-user
</span></span><span style="display:flex;"><span>AuthType Basic
</span></span><span style="display:flex;"><span>AuthName &#34;My subversion repositories&#34;
</span></span><span style="display:flex;"><span>AuthUserFile /home/myself/private/myrepos.pw
</span></span><span style="display:flex;"><span>&lt;/Location&gt;
</span></span></code></pre></div><p>The file specified in AuthzSVNAccessFile is a plain text file which defines fine-grained access lists. Note that all path names specified are relative to the SVNPath.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span># Allow anonymous read access to everything by default.
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span>[/]
</span></span><span style="display:flex;"><span>\* = r
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span># Grant alice and bob write access to all of /myproject1/.
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span>[/myproject]
</span></span><span style="display:flex;"><span>\* = r
</span></span><span style="display:flex;"><span>leo = rw
</span></span><span style="display:flex;"><span>temp = rw
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span># Grant carol and charlie write access to only /myproject/foo
</span></span><span style="display:flex;"><span>#
</span></span><span style="display:flex;"><span>[/myproject/foo]
</span></span><span style="display:flex;"><span>leo= rw
</span></span><span style="display:flex;"><span>temp = rw
</span></span></code></pre></div>]]></content:encoded>
    </item>
  </channel>
</rss>
