FreeKB - Configure HTTPD web server with Subversion
Configure HTTPD web server with Subversion

Home > Search

This assume you have already installed Subversion.

It is very common to interact with Subversion over HTTP. To do this, use apt-get or yum to install HTTPD web server and the Subversion module.

apt-get install httpd mod_dav_svn
yum install httpd mod_dav_svn


Edit the /etc/httpd/conf.modules.d/10-subversion.conf file, and add the following markup.

Alias /svn /var/www/svn
<Location /svn>
   DAV svn
   SVNParentPath /var/www/svn/
   AuthType Basic
   AuthName "Subversion repositories"
   AuthUserFile /etc/svn-auth-users
   Require valid-user


Since /var/www/svn was set as the Subversion parent directory, create the /var/www/svn directory.

mkdir /var/www/svn


Create a user that will be allowed access to the repository.

htpasswd -cm /etc/svn-auth-users john.doe


If firewalld is enabled, issue the following commands to allow HTTP and HTTPS in the firewall.

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload


Start and enable the HTTPD web server.

systemctl enable httpd
systemctl restart httpd


You can now go to You will get 403 Forbidden. This is normal. If you get 403 Forbidden, then the web server is setup properly.

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 8fb06 in the box below so that we can be sure you are a human.