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.

Got apache 2.2 listening on 2 ports: one for public serving and just added the second one for maintenance purposes. Now, Here's what works:

<VirtualHost *>
        ServerName some.public.domain
    DocumentRoot /var/www
        <Location /svn>
                DAV svn
                SVNPath /var/svn
        </Location>
</VirtualHost>

And this doesn't:

<VirtualHost 127.0.0.1:40>
        ServerName localhost
    DocumentRoot /var/www_tmp
        <Location /svn>
                DAV svn
                SVNPath /var/svn/concrete_repo
        </Location>
</VirtualHost>

Accessing http://localhost%3A40/svn results in a

File does not exist: /var/www_tmp/svn

record in apache error log. Any ideas?

TIA.

share|improve this question
    
Basic question: Does /var/www_tmp/svn exist? –  Mark Henderson Aug 31 '09 at 9:19
    
Nope, neither does /var/www/svn from the first config (edited to make it clear). Mapping to a physical dir should be done by DAV module that refuses to work. –  yanchenko Aug 31 '09 at 9:25
    
Ah, of course. Sorry I missed the DAV part, it's been a while since I set up subversion –  Mark Henderson Aug 31 '09 at 9:27
    
you compare document root with svn added with document root only! The error is about /var/www_tmp not existsing, not /var/www_tmp/svn not existing. DocuemtnRoot has to be a real physical directory, the "Location" stuff is a virtual path referring to the path that is requested by the browser when accessing this virtual host. –  Henning Aug 31 '09 at 11:22
add comment

4 Answers

Document root should exists, the Dav mapping is made only on the Location part.

In other words apache (without Dav) must be aware of its document root, then mod_dav can do the trick and create a "virtual" DOCUMENT_ROOT/svn

share|improve this answer
    
/var/www_tmp is an existing location –  yanchenko Aug 31 '09 at 15:30
add comment

Do you have this directive before the VirtualHost?

NameVirtualHost *
share|improve this answer
    
Listen 40 Listen 80 NameVirtualHost * –  yanchenko Aug 31 '09 at 9:29
add comment

You have

  DocumentRoot /var/www_tmp

and

  SVNPath /var/www/svn

probably a typo...fix it and see what happens

share|improve this answer
    
Edited the first post. –  yanchenko Aug 31 '09 at 9:30
add comment
up vote 0 down vote accepted

Ok, here's what has worked out:

<Location /svn>
        DAV svn
        SVNParentPath /var/svn
        SVNListParentPath on
</Location>
share|improve this answer
add comment

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.