Apache DAV-SVN (Linux): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 69: | Zeile 69: | ||
Redirect / https://svn.kirner.or.at | Redirect / https://svn.kirner.or.at | ||
</VirtualHost> | </VirtualHost> | ||
</pre> | |||
<pre> | |||
<virtualhost *:443> | |||
ServerName svn.kirner.or.at | |||
SSLEngine On | |||
SSLCertificateFile /etc/ssl/certs/svn.crt | |||
SSLCertificateKeyFile /etc/ssl/private/apache.key | |||
DavLockDB /var/www/svn/DavLock | |||
<Location /> | |||
Dav svn | |||
SVNParentPath /home/svn | |||
SVNListParentPath on | |||
AuthType Basic | |||
AuthName "Subversion repository" | |||
AuthUserFile "/etc/apache2/dav_svn.passwd" | |||
Require valid-user | |||
</Location> | |||
ErrorLog ${APACHE_LOG_DIR}/svn.kirner.or.at-error.log | |||
CustomLog ${APACHE_LOG_DIR}/svn.kirner.or.at-access.log combined | |||
</virtualhost> | |||
</pre> | </pre> | ||
Version vom 18. August 2018, 17:44 Uhr
Installation
sudo a2enmod dav sudo a2enmod dav_svn sudo a2enmod dav_fs
Konfiguration
Die Datei dav_svn.conf bearbeiten
sudo vi /etc/apache2/mods-available/dav_svn.conf
und folgende Zeilen hinzufügen:
<Location /svn> DAV svn SVNParentPath /home/svn SVNListParentPath on AuthType Basic AuthName "Subversion repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user </Location>
Soll Lesezugriff ohne Passworteingabe erlaubt sein, dann die LimitExcept-Direktive hinzufügen:
<Location /svn> ... <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> ... </Location>
Passwort-Datenbank anlegen (falls die Datenbank noch nicht existiert, ist der Parameter -c erforderlich):
sudo htpasswd /etc/apache2/dav_svn.passwd <user name>
Zum Abschluss muss der Server neu gestartet werden:
sudo /etc/init.d/apache2 restart
Aufruf
per IP
http://<server ip>/svn/
per DNS
<VirtualHost *:80> ServerName svn.kirner.or.at ServerAlias svn.kirner.or.at Redirect / https://svn.kirner.or.at </VirtualHost>
<virtualhost *:443> ServerName svn.kirner.or.at SSLEngine On SSLCertificateFile /etc/ssl/certs/svn.crt SSLCertificateKeyFile /etc/ssl/private/apache.key DavLockDB /var/www/svn/DavLock <Location /> Dav svn SVNParentPath /home/svn SVNListParentPath on AuthType Basic AuthName "Subversion repository" AuthUserFile "/etc/apache2/dav_svn.passwd" Require valid-user </Location> ErrorLog ${APACHE_LOG_DIR}/svn.kirner.or.at-error.log CustomLog ${APACHE_LOG_DIR}/svn.kirner.or.at-access.log combined </virtualhost>
Links
https://httpd.apache.org/docs/2.4/mod/mod_dav.html
Probleme
The URI does not contain the name of a repository.
Wenn kein spezielles Repository ausgewählt wird, können mit der Option SVNListParentPath alle verfügbaren Reposities aufgelistet werden:
<Location /svn> ... SVNListParentPath on ... </Location>
Links
https://wiki.ubuntuusers.de/Archiv/Subversion/
Zurück zu Subversion