---
title: "Setting Up a Secure Subversion Server With Apache in Ubuntu"
description: "If you have not read theApache HTTPS, read it before you go through this post. ’Subversion (SVN) is a version control system."
url: "https://h3manth.com/scribe/setting-secure-subversion-server-apache-ubuntu/"
canonical_url: "https://h3manth.com/scribe/setting-secure-subversion-server-apache-ubuntu/"
markdown_url: "https://h3manth.com/scribe/blog/setting-secure-subversion-server-apache-ubuntu.md"
publishDate: "2009-11-21T00:00:00.000Z"
author: "Hemanth HM"
category: "linux"
tags: ["ubuntu","git","web"]
word_count: 225
reading_time_minutes: 2
x_markdown_tokens: 520
content_signal: "ai-train=yes, search=yes, ai-input=yes"
---

# Setting Up a Secure Subversion Server With Apache in Ubuntu

> If you have not read theApache HTTPS, read it before you go through this post. ’Subversion (SVN) is a version control system.

**If you have not read the[Apache HTTPS](http://h3manth.com/content/how-secure-apache-https), read it before you go through this post.**

_"Subversion (SVN) is a version control system initiated in 1999 by CollabNet Inc. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly-compatible successor to the widely used Concurrent Versions System (CVS)." -Wikipedia_

**Steps are pretty easy now:** ` _**Step 1:**_ **Get subversion and Subversion modules for Apache2** **sudo apt-get install subversion subversion-tools libapache2-svn**`

_**Step 2:**_ **Creating repository and setting permissions**

**sudo mkdir /var/svn sudo svnadmin create /var/svn/test sudo chown -R www-data:www-data /var/svn/test sudo chmod -R g+ws /var/svn/test**

_P.S: test is the name of the repo_

_**Step 3:**_ **Configure Apache to detect the svn** _edit /etc/apache2/mods-available/dav_svn.conf_ **See the sample file that is attached**

_**Step 4:**_ **use -c option for the first users****sudo htpasswd -c /etc/subversion/test.passwd hemanth sudo htpasswd /etc/subversion/test.passwd ubuntu******

_**Step 5:**_ **Reload Apache** **sudo /etc/init.d/apache2 reload**

_Now check your https://localhost/svn it must say revision 0_

**_Checking out and adding files to svn_** **svn co https://localhost/svn/test test --username hemanth** _It will prompt you for your password before checkout_ **cd test $ echo 'Hello, g33k' > hello.txt** **svn add hello.txt** **svn commit -m "Added my first file"**

**That's it, now you can refresh you page to see the new file.** **Now download this book:[svnbook(click)](http://svnbook.red-bean.com/en/1.5/svn-book.pdf) **
