How to enable SSL for subversion?


  • Edit httpd.conf file in the subversion installation location

cd /etc/opt/CollabNet_Subversion/con

sudo vi httpd.conf

  • Make sure the following line is not commented

Include etc/opt/CollabNet_Subversion/conf/extra/httpd-ssl.conf

  • Edit key and cert file info in etc/opt/CollabNet_Subversion/conf/extra/httpd-ssl.conf

Edit following lines with the right certificate and key files. Also make sure to comment if any existing similar configuration.

SSLCertificateFile /usr/local/apache2/ssl/************.crt
SSLCertificateKeyFile /usr/local/apache2/ssl/**********.key

  • Edit port info in etc/opt/CollabNet_Subversion/conf/extra/httpd-ssl.conf

Edit the following lines with available port no. Make sure to configure with unused port no.

Listen 4443

VirtualHost _default_:4443

  • Stop and Restart subversion

sudo /opt/CollabNet_Subversion/bin/apachectl -k stop
sudo /opt/CollabNet_Subversion/bin/apachectl -k start

     Now your subversion is SSL ready.