Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I followed these steps on my fresh VM (Debian 6)

http://stackoverflow.com/questions/60736/how-to-setup-a-subversion-svn-server-on-gnu-linux-ubuntu

i just realized where NameVirtualHostwas 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!

share|improve this question
    
Have you added the ServerName in the apache virtualhost block? Chida –  Chida Aug 10 '12 at 13:41
    
can you post the entire Virtualhost block? –  qweet Aug 10 '12 at 13:46
    
thanks for the reply. i added it in the original post. i added the servername into /etc/apache2/apache2.conf as it was stated in the tutorial. maybe thats wrong? –  Wandang Aug 10 '12 at 14:23
    
Whata the Apache error log say? –  jamieb Aug 10 '12 at 14:26
    
interestingly it says i dont have an svn in that directory. but i used sudo svnadmin create /var/svn/$REPOS with success. –  Wandang Aug 10 '12 at 14:43

2 Answers 2

up vote 2 down vote accepted

Sounds like you setup a SVNParentPath in the apache Location but did not provide a repository name in the client. E.g.:

<Location /svn>
  SVNParentPath /my/repos
  # ...
</Location>

accessed with client URL: http://server/svn

The /svn URL is not a repository but a parent path, you would need to svnadmin create /my/repos/repo1 and then access http://server/svn/repo1

If you turn on the list parent path directive within the Location block you can list the sub-repositories:

<Location /svn>
  SVNParentPath /my/repos
  SVNListParentPath On
  # ...
</Location>
share|improve this answer
    
adding SVNListParentPath On leads to another output on the website which i edited into the original question –  Wandang Aug 13 '12 at 8:33
    
Can you include the SVN "Location" directive configuration as well please. –  vinnyjames Aug 13 '12 at 12:45
    
you mean the full dav_svn.conf ? added to the original question. thank you for your help –  Wandang Aug 13 '12 at 13:14
1  
the SVNParentPath isn't /var/svn it's /var/svn/svn-repos –  vinnyjames Aug 14 '12 at 2:44
1  
ah you meant it the other way around. setting it to svn did the trick. Now i get a Collection of Repositories –  Wandang Aug 14 '12 at 14:05

What does your <Location /svn> block look like? It should have an SVNPath or SVNParentPath statement pointing to your repository. In that same block there should be the <LimitExcept> block.

Is /var/svn/$REPOS (or whatever SVN(Parent)Path points to) owned by www-data? It should be, or at least it should be readable and writeable by www-data.

share|improve this answer
    
first: www-data owns it (sudo chown -R www-data:www-data /var/svn/$REPOS) second: SVNParentPath /var/svn/svn-repos is my entry. third: the <LimitExcept> block is uncommented/active –  Wandang Aug 13 '12 at 8:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.