Install and configure Subversion + Aapache + SSL and permission settings on Ubuntu

Source: Internet
Author: User
1. first, install the required software. run the following command on the Unbuntu to install the Subversion, Apache2, and the connection driver module. Sudoapt-getinstallsubversionlibapache2-svnapache22, enable SSL to make it effective: sudoa2enmodsslsudoecho & ldquo; Listen 1, first need to install the required software, enter the following command on Unbuntu to complete the installation of Subversion, Apache2 and connection driver module.

Sudo apt-get install sub version libapache2-svn apache2

2. enable SSL to make it valid:

Sudo a2enmod ssl
Sudo echo "Listen 443">/etc/apache2/ports. conf



3. generate an SSL encryption certificate:

Sudo apache2-ssl-certificate

This operation involves a lot of questions based on the command line method, as long as any input, the purpose is to generate a unique certificate

4. create a new virtual host in apache to access the content in the svn repository through the web.
Copy an existing apache virtual host configuration file and edit it. the virtual host configuration file name is assumed to be svn:

Cp/etc/apache2/sites-available/default/etc/apache2/sites-available/svn

Edit it:

Vim/etc/apache2/sites-available/svn

Make the following modifications and additions:

Namevirtualhost*: 443

SSLEngine
SSLCertificateFile/etc/apache2/ssl/apache. pem
SSLProtocol all
SSLCipherSuite HIGH: MEDIUM
......

5. make the VM take effect:

A2ensite svn
/Etc/init. d/apache2 restart

6. create a SVN Repository file library

Sudo mkdir/var/svn
Sudo svnadmin create/var/svn/newRepo
Sudo chown-R www-data: www-data/var/svn/newRepo
Chmod-R g + ws/var/svn/newRepo

7. set access permissions for SVN Repository Archives

Sudo htpasswd2-c-m/etc/apache2/dav_svn.passwd username

This command adds the "user name" to the permission list

8. modify the WebDAV and SVN configurations to make the permission settings valid.
Add the following content to the/etc/apache2/mod-available/dav_svn.conf file:

DAV svn
SVNParentPath/var/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile/etc/apache2/dav_svn.passwd
Require valid-user
SSLRequireSSL

If anonymous access is not allowed, comment out the following content:

#
#

9. restart apache!

Sudo/etc/init. d/apache2 restart
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.