SVN : how to change hostname

hostnamesvn

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)

Best Answer

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

Related Topic