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.

link|improve this question

67% accept rate
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. – alex 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
feedback

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

link|improve this answer
/var/www_tmp is an existing location – alex Aug 31 '09 at 15:30
feedback

Do you have this directive before the VirtualHost?

NameVirtualHost *
link|improve this answer
Listen 40 Listen 80 NameVirtualHost * – alex Aug 31 '09 at 9:29
feedback

You have

  DocumentRoot /var/www_tmp

and

  SVNPath /var/www/svn

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

link|improve this answer
Edited the first post. – alex Aug 31 '09 at 9:30
feedback
up vote 0 down vote accepted

Ok, here's what has worked out:

<Location /svn>
        DAV svn
        SVNParentPath /var/svn
        SVNListParentPath on
</Location>
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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