I followed these steps on my fresh VM (Debian 6)
https://stackoverflow.com/questions/60736/how-to-setup-a-subversion-svn-server-on-gnu-linux-ubuntu
i just realized where NameVirtualHost
was and configured it to NameVirtualHost *:443
but it did not help.
my complete svnserver config:
#<VirtualHost *:80>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLProtocol all
SSLCipherSuite HIGH:MEDIUM
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
When i try to reach the site outsite the VM via browser i get a 403 Forbidden.
my dav_svn.conf:
<Location /svn>
# Uncomment this to enable the repository
DAV svn
SVNParentPath /var/svn/svn-repos
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
# To enable authorization via mod_authz_svn
#AuthzSVNAccessFile /etc/apache2/dav_svn.authz
# The following three lines allow anonymous read, but make
# committers authenticate themselves. It requires the 'authz_user'
# module (enable it with 'a2enmod').
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
#Added
SVNListParentPath On
</Location>
should allow external users to access the svn (as stated in the tutorial).
So why do i get the 403 error?
the apache error log:
[Fri Aug 10 17:51:11 2012] [error] [client my.main.pc.ip] Could not fetch resource information. [403, #0]
[Fri Aug 10 17:51:11 2012] [error] [client my.main.pc.ip] (2)No such file or directory: The URI does not contain the name of a repository. [403, #190001]
i added SVNListParentPath On
to my Location Block and get the following output in my browser:
<D:error><C:error/><m:human-readable errcode="2">
Can't open directory '/var/svn/svn-repos': No such file or directory
</m:human-readable></D:error>
Update:
Using SVNPath
and instead using SVNParentPath
solved the problem. But i wanted to use more then one repository.
any help is appreciated!
Best Answer
Sounds like you setup a
SVNParentPath
in the apacheLocation
but did not provide a repository name in the client. E.g.:accessed with client URL:
http://server/svn
The
/svn
URL is not a repository but a parent path, you would need tosvnadmin create /my/repos/repo1
and then accesshttp://server/svn/repo1
If you turn on the list parent path directive within the
Location
block you can list the sub-repositories: