Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Could you teach me, how to create svn on the Redhat server, in which several sites, there is need to each of them: /home/webmaster/www/ /home/webmaster/www/yandexapi/ /home/webmaster/www/ /home/webmaster/www/

There is could be only one svn or several? How to get svn connection via http:// or svn://. Where can I adjust this? I have in this do not understand!

PS: Sorry for the possibly stupid question

share|improve this question
up vote 4 down vote accepted

There are many ways to do this, but here's a quick example. I'd suggest reading the SVN Book for more information here.

  • Create repos for each site:
    • svnadmin create /var/svn/site1
    • svnadmin create /var/svn/site2
  • configure apache2 to use webDAV and define SVN directory
  • mount repos via webDAV
    • mount -t dav2fs _http://localhost/svn/site1 /mnt/site1
  • add mounted directory to apache2 aliases

This allows you to view the latest SVN version from the alias and to access the SVN with a URL like _http://server/svn/site1 .

Had to put unnecessary underlines due to automatic link generation.-

share|improve this answer
SVN usually create in the directory "var"? – ajile Aug 31 '10 at 13:33
Not necessarily, it depends on the use. Since I used /var/www as my documentroot, I thought i'd put the repos there and chmod g+s that as well for multiple user access. – onik Aug 31 '10 at 22:48
Will the dav2fs method expose svn metafiles to the document root? I believe there may be security concerns there. – Kyle Smith Jun 10 '11 at 13:05
Well yeah, that's why i've used this only on production boxes on the intranet, and the final user-accessable (or generally internet-accessable) sites don't use SVN at all. – onik Jun 10 '11 at 19:38

i make a svn directory for every user/client i have, then they can make sub folder with different projects

  • /svn/clients/user1/

    • /svn/clients/user1/project1
    • /svn/clients/user1/project2
    • /svn/clients/user1/project3
  • /svn/clients/user2/

    • /svn/clients/user2/project1
    • /svn/clients/user2/project2
    • /svn/clients/user2/project3

To mount the svn repos use apache mod_dav and mod_svn

share|improve this answer

You can have a single repository or multiple - it doesn't really matter from a technical point of view as you can check out part of the repository or all of it depending on your needs.

However, if you work with other people on different sites you probably want one repo per site. One repo per site also works if you want to give each client a disk quota. I create a user folder for each user, and store the repo, staging site, and live site files in the user folder like this:


Check out from repo into local working folder and commit back to repo from there.

Check out/update from the repo into staging-site to show client the changes you have made and test. Once it is all working and agreed, check out/update into live-site. This gets a bit messy if multiple people try to do updates. Best if one person takes this role.

Read Red-Bean book as cited by onik. If you are doing any editing on Windows systems Tortoise-SVN will be invaluable. With Tortoise-SVN you can also connect via ssh+svn: pseudo-protocol. Works very well if you are using signature based ssh logins on your server.

share|improve this answer

Your Answer


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.