On Aug 7, 2006, at 03:04, Albert Krawczyk wrote:
> I'd like to start of by saying that I'm sorry if I'm asking stupid
> questions but I've spent too much time trying to do my own research on
> this topic already.
Don't worry; it can be tricky to get right!
> I'm a windows user (insert flaming here) and have recently started
> with a new team on developing a site. We have the site running in
> I installed subversion and related tools using
>> apt-get install subversion subversion-tools
The server is then not Windows, I gather? Debian Linux perhaps?
> My question is, can someone in idiot speak explain to me how to set up
> subversion to run from;
Well, if we're talking about filesystem paths here (and not web site
paths), then you should absolutely not put the repository files
there. You should put them anywhere else: anywhere outside of the web
server document root is fine. For example, at work, we have our
intranet site served from /data/vhosts/intranet/htdocs and the
repository in /data/svn/repo.
> the reason i need it to run from a sub directory of the main site
> is that
> i only have one domain-name that maps to /public/website/ and i
> can't get
> another one just for subversion,
There's nothing wrong with running the repository from a subdirectory
of the main site, *in terms of web site URLs*. In terms of filesystem
paths, though, they should not overlap, as stated above.
I'm not sure where it is in Debian or whatever Linux you're running,
but somewhere there will be a configuration file for Apache, often
called httpd.conf or apache.conf or something like that. In this file
there might be a virtual host for your main site, which might look
something like this:
If your server doesn't use virtual hosts, then it'll be the same
except the two lines <VirtualHost *:80> and </VirtualHost> won't be
You just need to put your repository somewhere (anywhere other than
inside /root/public/website)ólet's say you put it in /root/public/
subversion. Then you add some lines to the virtual host so it looks
AuthName "Example Repositories"
Assuming you want people to log in with usernames and passwords, you
would need the Auth and Require lines at the end of the Location
block and to set up the file /root/public/subversion/conf/users with
user authentication information. You create this file with the
htpasswd program from Apache. You could also use LDAP or other
authentication means; consult the Apache documentation if you want that.
SVNPathAuthz off is a performance improvement you can use if you
don't plan to restrict access to parts of the repository to specific
users (that is: if everybody is going to be allowed to access
everything in the repository).
The SVNIndexXSLT directive is if you want to customize the appearance
of the directory index you see in the web browser.
The repository files should be owned by the user Apache runs under,
which depending on the server OS might be nobody, www, apache, or
something else. Look for the line in the httpd.conf that starts with
"User "; that'll tell you. If for example it says "User nobody" then
you should make the repository owned by "nobody":
sudo chown -R nobody /root/public/subversion
Probably also best if that's the only user that can see the
sudo chmod -R go-rwx /root/public/subversion
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Mon Aug 7 16:34:19 2006