How to run multiple SVN services
-
11-09-2019 - |
Question
Having read Setting up Subversion on Windows I am trying to figure out how to run multiple SVN services on one machine. When I create more then one service using
sc create svnP1 ... binpath= "svnserve.exe --service -r c:\svn\repositories\project1"
sc create svnP2 ... binpath= "svnserve.exe --service -r c:\svn\repositories\project2"
as a template (actual commands truncated) both services listen on the same port and using svn://servername/project2 goes to project1
So how can I do this or am I going down the wrong track?
Solution
A bit tangential, but I just use VisualSVN Server. It is free, very easy to setup ("next", "next"...), and comes with an MMC snap-in to do all the admin. This makes it a doddle to get working on multiple repositories, without having to add extra services each time.
(note; they charge for the client, but you can use any SVN client to talk to it; I like TortoiseSVN, but whatever you like...)
Also - under the hood, it uses Apache to expose the data, providing both HTTPS for security, and allowing internet usage over firewall-friendly ports.
Finally, it even allows the choice of "regular" username/password pairs, or integration with your network (domain etc) credentials. Pretty slick.
OTHER TIPS
I'm not sure why you would need separate services. One service can handle multiple repositories.
I think what you want is:
sc create svn ... binpath= "svnserve.exe --service -r c:\svn\repositories"
And then to create project1 and project2 as separate repositories:
svnadmin create c:\svn\repositories\project1
svnadmin create c:\svn\repositories\project2
This will create two independent repositories that can be configures separately for users and hook scripts.