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

Re: Newbie - setting up apache

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2005-12-20 10:37:32 CET

On Dec 19, 2005, at 22:14, Jan Erik Moström wrote:

> I plan to use a sub-domain to access the repositories and I've come
> up with
> the following config file
>
> <VirtualHost *>
> ServerName svn.xxx.xx
> DocumentRoot /somewhere/websvn
>
> DAV svn
> SVNParentPath /somewhere/websvn
> AuthType Basic
> AuthName "Subversion storage"
> AuthUserFile /hhhhh/passwordfile
> Require valid-user
> </VirtualHost>

 From the name of your directory, I assume you're trying to install a
tool called WebSVN, which is a web-based repository browser:

http://websvn.tigris.org/

If so, then that's completely separate from setting up SVN for access
through Apache2.

So, first, to set up your repositories for access through Apache2,
you'd use something like this:

<VirtualHost *:80>
        ServerName svn.example.com
        DocumentRoot /var/empty
        DAV svn
        SVNParentPath /path/to/your/repositories
        AuthType Basic
        AuthName "Subversion storage"
        AuthUserFile /path/to/passwordfile
        Require valid-user
</VirtualHost>

The DocumentRoot is irrelevant and can be any directory. I don't know
if Apache will let you define a vhost that has no DocumentRoot; if it
does, you can leave that line out completely.

Inside /path/to/your/repositories, you create various repositories
using svnadmin create:

svnadmin create /path/to/your/repositories/foo
svnadmin create /path/to/your/repositories/bar

Then you can access them with:

svn ls http://svn.example.com/foo
svn ls http://svn.example.com/bar

If you want to be able to get a list of repositories like this:

svn ls http://svn.example.com

I believe you'll have to wait until Subversion 1.3 for that.

If you didn't want multiple repositories, but instead a single
repository, then you wouldn't use SVNParentPath /path/to/your/
repositories; instead, you'd use SVNPath /path/to/your/repository,
and you would create the repository like this:

svnadmin create /path/to/your/repository

Setting up WebSVN is then a completely separate matter. You could set
up a second vhost for that:

<VirtualHost *:80>
        ServerName websvn.example.cmo
        DocumentRoot /path/to/websvn
        #whatever other options WebSVN requires; see their documentation
</VirtualHost>

And then I expect you'll have to configure WebSVN following their
directions.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 20 10:53:34 2005

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.