[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: dav_svn enabled for one hostname only?

From: Ryan Schmidt <subversion-2011a_at_ryandesign.com>
Date: Wed, 9 Mar 2011 19:08:05 -0600

On Mar 9, 2011, at 03:07, Oliver Marshall wrote:

> Is it possible to enable the dav_svn module for one hostname only?

Modules are *loaded* globally for an Apache instance, but the directives to actually make use of a module can be limited by any number of means, including hostname, as discussed further below.

> We have a development box which was just being used for SVN. Then Trac got added, then it started being used for hosting demo sites, then ….. etc.
>
> We now have about 10 various hostnames on there and we have found if you add /svn on to any of them you can access the SVN module. This isn’t a massive issue as it’s password protected but only the SVN site itself (dev.mydomain.com) is SSL enabled.

This is a matter of where you use your "DAV svn" statement (the statement that says "I want mod_dav_svn to start taking effect here"), and yes, that should absolutely be restricted to only the area you want it to be used in, for example a particular hostname. You probably have "DAV svn" and all the other directives relating to serving your repository(ies) sitting naked in the main part of your Apache httpd.conf file:

<Location /svn/>
        DAV svn
        ...
</Location>

And you should move them into a VirtualHost directive specific to the hostname you want them to be used in, e.g.:

<VirtualHost *:80>
        ServerName dev.example.com
        <Location /svn/>
                DAV svn
                ...
        </Location>
</VirtualHost>

You may already have a VirtualHost directive for this hostname; in that case, don't add a second one, but merge these directives into the existing one.
Received on 2011-03-10 02:08:41 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.