Apache2 Subversion SSL



Install apache2.

~$ sudo apt-get install apache2

Install ssl-cert. (It’s already installed.)

~$ sudo apt-get install ssl-cert
ssl-cert is already the newest version.

Enable SSL.

~$ sudo a2enmod ssl
~$ sudo service apache2 restart
~$ sudo a2ensite default-ssl
~$ sudo service apache2 reload

The self-signed certificate

Check -days options in /usr/sbin/make-ssl-cert script.

~$ sudo grep '\-days' /usr/sbin/make-ssl-cert
     if ! openssl req -config $TMPFILE -new -x509 -days 3650 -nodes \
     if ! openssl req -config $TMPFILE -new -x509 -days 3650 -nodes \

Check the current hostname value.

~$ hostname -f


~$ sudo apt-get install subversion libapache2-svn

Edit /etc/apache2/mods-available/dav_svn.conf.

<Location /svn>
  DAV on
  SVNParentPath /srv/svn
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  AuthSVNAccessFile /etc/apache2/dav_svn.authz
  Require valid-user

Create a repository.

~$ sudo svnadmin create /srv/svn/<repo>
~$ sudo chown -R www-data /srv/svn/<repo>
~$ sudo chmod -R 770 /srv/svn/<repo>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s