I'd like to sep up SVN repo on local machine. But we already have apache running under localhost. When I use instalator form subversion site with apache option it installs another apache and when I type "localhost" in browser I see this new apache (not the old one).

Question is how to run this new apache under other host name. When installing it asks about it, so I set different name, but it still works under localhost (nothing happens). I'd like to have access to svn via URL e.g. "svnrepo" not "localhost". What can I do about it? Which lines of config should be changed (and/or what's more should be changed?)

Another way I'm thinking of to solve this problem is to integrate this svn-apache module with mine apache. But still I don't really know how to do it (my apache is 2.2.6)

migrated from stackoverflow.com May 30 '10 at 4:26

This question came from our site for professional and enthusiast programmers.


Now that you've got two Apaches installed the easiest way to do this is to assign a second IP address to your machine and then map the two Apache instances to the different IP addresses.

How to add a 2nd IP address depends vastly on your operating system (the process is called Multi-Homing) and seeing as you haven't specified an OS I can't speculate on how this is done in your situation.

Once you have two IP addresses on your machine, change the listen directive in each of the httpd.conf files to bind each version of apache to a different IP address.

Then, at your DNS server, give the SVN IP address a name (like svnrepo), and hey presto, http://svnrepo/ will point to the SVN apache, leaving the 2nd instance seperate.

The "correct" way of doing this properly (I use that term loosely because there's nothing inherantly wrong with two installations, it's just more maintenance) is to enable the dav_svn module in your original Apache installation and set up your repository that way

  • My OS: Windows XP SP2. Please write how I can do it on this type of OS. I thought so, that adding dav_svn module will be batter, but still I don't know how to do this, Please give me some advice or any articles that would help me with this issue. – elon May 31 '10 at 19:49

To enable dav_svn - turn the module on then add the following config:

<Location /svn>
  DAV svn
  SVNParentPath /var/lib/svn
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user

Replace the paths for Windows style ones. SVNParentPath is the path to a folder which contains your repositories. AuthUserFile is the path to a standard apache passwords file. Skip all the commands with Auth* at the beginning if you don't need authentication.

You will be able to access the SVN repositories via http using this url http://localhost/svn/repository_name


I think I'd go with your last point, and integrate the Subversion server into your existing Apache (httpd) instance.

I'd recommend the SlikSVN version of the Windows server, as it comes without any httpd instance or bindings. You will then have the command-line tools to manage repositories (svnadmin, etc.).

I've always done the SVN/httpd bindings by hand, and the best reference I've found was "Version Control with Subversion" (the red-bean book). The information on manually configuring Apache also has a number of basic examples, and can also help you set up authentication if needed.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.