Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)

share|improve this question

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

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

3 Answers 3

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

share|improve this answer
    
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
</Location>

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*

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

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.