# apt-get install apache2 openssl ssl-cert
# mkdir /etc/apache2/ssl
# make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache2.pem
# chmod 600 /etc/apache2/ssl/apache.pem
# cd /etc/apache2/sites-available/
# cp default ssl
# a2ensite ssl
# a2enmod ssl
# vim /etc/apache2/ports.conf
..
Listen 443
..
# vim /etc/apache2/sites-available/svn
..
NameVirtualHost *:443
VirtualHost *:443
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
..
VirtualHost
# /etc/init.d/apache2 restart
At this point you have an Apache server with SSL. Follow the next commands in order to integrate svn with Apache+SLL
# cd /
# mkdir /svnroot
# chown www-data /svnroot/
# su www-data -c "svnadmin create /svnroot/repository"
# su www-data -c "htpasswd -c -m /svnroot/.dav_svn.passwd testuser"
..
..
# vim /etc/apache2/sites-available/svn
..
Location /svn
DAV svn
SVNParentPath /svnroot/
AuthType Basic
AuthName "LibreForge Subversion Repository"
AuthUserFile /svnroot/.dav_svn.passwd
Require valid-user
Location
..
# /etc/init.d/apache2 restart
Now you can use your repository with the testuser created recently:
$ svn co https://your.domain.tld/svn/repository
$ cd repository
$ touch testfile
$ svn add testfile
$ svn ci -m "restfile added"
Or see your repository through https, https://your.domain.tld/svn/repository
0 comments:
Post a Comment