I have an Ubuntu 20 running on a PC on my home network that I want to use as a Subversion server within my house on my local network. I have Apache web server installed as well as Subversion installed and I now want to add access through the Apache web server using the HTTP DAV protocol.
I intend to use Visual Studio with the Ankh plug-in on a Windows PC with the Subversion on the Ubuntu server for storing my source code repository.
What is the current way of modifying the Apache configuration so as to enable accessing Subversion using HTTP? The directions thus far that I have found seem to be a bit light on information, being nothing more than a series of commands to use, and for some reason they appear to be old.
It appears to me that since I'm supporting a single user on a local network, I need to:
- create a Subversion repository
- modify the file
dav_svn.conf
located in the folder/etc/apache2/mods-enabled
- restart Apache
After doing the above I should be able to access my Subversion repository using the Ankh plug-in for Visual Studio using a URL such as https://192.168.0.4/svn/
, assuming my Ubuntu server is at IP address 192.168.0.4
on my local home network.
Where I currently am:
- Apache is installed and running and serving pages
- Subversion is installed along with libapache2-mod-svn
- I have not yet created a Subversion repository
Versions of Apache and Subversion are:
rick@rick-MS-7B98:/etc/apache2/mods-enabled$ apache2 -version
Server version: Apache/2.4.41 (Ubuntu)
Server built: 2020-08-12T19:46:17
rick@rick-MS-7B98:/etc/apache2/mods-enabled$ svn --version
svn, version 1.13.0 (r1867053)
compiled Mar 24 2020, 12:33:36 on x86_64-pc-linux-gnu
I have found in the folder /etc/apache2/mods-enabled
a file dav_svn.conf
which appears to be a configuration file for DAV access to Subversion through Apache. That file contains:
rick@rick-MS-7B98:/etc/apache2/mods-enabled$ cat dav_svn.conf
# dav_svn.conf - Example Subversion/Apache configuration
#
# For details and further options see the Apache user manual and
# the Subversion book.
#
# NOTE: for a setup with multiple vhosts, you will want to do this
# configuration in /etc/apache2/sites-available/*, not here.
# <Location URL> ... </Location>
# URL controls how the repository appears to the outside world.
# In this example clients access the repository as http://hostname/svn/
# Note, a literal /svn should NOT exist in your document root.
#<Location /svn>
# Uncomment this to enable the repository
#DAV svn
# Set this to the path to your repository
#SVNPath /var/lib/svn
# Alternatively, use SVNParentPath if you have multiple repositories under
# under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...).
# You need either SVNPath or SVNParentPath, but not both.
#SVNParentPath /var/lib/svn
# Access control is done at 3 levels: (1) Apache authentication, via
# any of several methods. A "Basic Auth" section is commented out
# below. (2) Apache <Limit> and <LimitExcept>, also commented out
# below. (3) mod_authz_svn is a svn-specific authorization module
# which offers fine-grained read/write access control for paths
# within a repository. (The first two layers are coarse-grained; you
# can only enable/disable access to an entire repository.) Note that
# mod_authz_svn is noticeably slower than the other two layers, so if
# you don't need the fine-grained control, don't configure it.
# Basic Authentication is repository-wide. It is not secure unless
# you are using https. See the 'htpasswd' command to create and
# manage the password file - and the documentation for the
# 'auth_basic' and 'authn_file' modules, which you will need for this
# (enable them with 'a2enmod').
#AuthType Basic
#AuthName "Subversion Repository"
#AuthUserFile /etc/apache2/dav_svn.passwd
# To enable authorization via mod_authz_svn (enable that module separately):
#<IfModule mod_authz_svn.c>
#AuthzSVNAccessFile /etc/apache2/dav_svn.authz
#</IfModule>
# The following three lines allow anonymous read, but make
# committers authenticate themselves. It requires the 'authz_user'
# module (enable it with 'a2enmod').
#<LimitExcept GET PROPFIND OPTIONS REPORT>
#Require valid-user
#</LimitExcept>
#</Location>