Svn via https: Difference between revisions
From Andreida
(Created page with "Install apache, https-svn package and subversion itself: apt-get install apache2 libapache2-svn subversion Enable the ssl mod: a2enmod ssl Check the listen ports: (443 is ...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Install apache, https-svn package and subversion itself: |
Install apache, https-svn package and subversion itself: |
||
apt-get install apache2 libapache2-svn subversion |
apt-get install apache2 libapache2-svn subversion |
||
OR (if libapache2-svn is not available) |
|||
apt-get install apache2 libapache2-mod-svn subversion |
|||
Enable the ssl mod: |
Enable the ssl mod: |
||
a2enmod ssl |
a2enmod ssl |
||
Perhaps, if a2enmod is unknown: Make sure /usr/sbin is in PATH, for example source /etc/profile in ~/.bashrc (.profile was not sourced for me) |
|||
Check the listen ports: (443 is normal ssl) |
Check the listen ports: (443 is normal ssl) |
||
Line 65: | Line 70: | ||
chown -R www-data:www-data /var/reps |
chown -R www-data:www-data /var/reps |
||
chmod -R 770 /var/reps |
chmod -R 770 /var/reps |
||
Now check your firewall rules for 443/https and do a |
|||
/etc/init.d/apache2 restart |
|||
svn list --username myuser https://www.yourDomain.com/svn/demo-1 |
Latest revision as of 14:03, 29 February 2020
Install apache, https-svn package and subversion itself:
apt-get install apache2 libapache2-svn subversion
OR (if libapache2-svn is not available)
apt-get install apache2 libapache2-mod-svn subversion
Enable the ssl mod:
a2enmod ssl
Perhaps, if a2enmod is unknown: Make sure /usr/sbin is in PATH, for example source /etc/profile in ~/.bashrc (.profile was not sourced for me)
Check the listen ports: (443 is normal ssl)
vi /etc/apache2/ports.conf
Copy the default site to your new site
cd /etc/apache2/sites-available cp default-ssl.conf svn-ssl.conf
Enable the site
cd /etc/apache2/sites-enabled ln -s ../sites-available/svn-ssl.conf
Enable dav: (just follow the instructions)
vi /etc/apache2/mods-available/dav_svn.conf
Example:
<Location /svn> DAV svn SVNParentPath /var/reps AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd AuthzSVNAccessFile /etc/apache2/dav_svn.authz Require valid-user </Location>
Enable the security:
a2enmod authn_file a2enmod auth_basic
Create user and password
htpasswd -c /etc/apache2/dav_svn.passwd myuser
Add user and password
htpasswd /etc/apache2/dav_svn.passwd myuser2
Edit the per directory permissions:
vi /etc/apache2/dav_svn.authz [repository1:/] harry = rw sally = r [repository1:/path/somewhere] sally = rw [repository2:/] sally = rw
Create the repositories:
cd /var/reps svnadmin create demo-1 svnadmin create demo-2 svnadmin create demo-3
Allow the webserver to read and write the svn files:
chown -R www-data:www-data /var/reps chmod -R 770 /var/reps
Now check your firewall rules for 443/https and do a
/etc/init.d/apache2 restart
svn list --username myuser https://www.yourDomain.com/svn/demo-1