Joe Spinozzi
Joe Spinozzi

Reputation: 11

Changing URL in VisualSVN

Have 5 year old server ready to decommission and have new server with VisualSVN just installed. Our old server had a very memorable URL such as svn://company.com. Now the path on the new server is terrible - https://server.company.com:8443/svn/MyRepo. I'd much prefer to have something much shorter with a dozen engineers needing to use it.

I've read other posts saying we should visit httpd.conf but I can't even find that file in the conf folder.

I've also read that VisualSVN support states they cannot support this as of mid-2009. They also suggest not changing the httpd.conf file.

Anyone have answers on the topic?

Upvotes: 1

Views: 3446

Answers (2)

bahrep
bahrep

Reputation: 30662

Beginning with VisualSVN Server 3.5, it is possible to adjust the URL to your repositories. In other words, prior to version 3.5 the URL always looked like https://example/svn/myrepo/. It is now possible to change the "/svn" part to "/repos" or any other prefix you'd like. Moreover, you can completely remove the prefix.

Follow these steps to customize the URL prefix:

  1. Start VisualSVN Server Manager.
  2. Go to Action | Properties.
  3. Select Network tab.
  4. Select Customize under Repositories URL:

You can select "Empty URL prefix" option to remove the "/svn" prefix completely or select "Custom URL prefix" and specify the prefix you'd like to use in the URL (for example, "repos").

Upvotes: 1

Lazy Badger
Lazy Badger

Reputation: 97280

OK, lets split problem on separate small tasks

  • Convert server.company.com into company.com

Pure DNS issue, write needed data in DNS-zone for internal domain or use local hosts-file

  • Convert company.com:8443 into company.com

Start VisualSVN Server (plain VisualSVN is SVN-plugin for Visual Studio) on 80 port

  • Convert company.com/svn/ path into company.com/

Read my answer in the part "How to have DAV-SVN in the site-root" ("Implementation", p.3)

  • Remove repository name from URL

Default config implies using more than one repo from one server. If it is not your case and you have one repo, you can modify Location data and use wanted and needed SVN directive (we'll consult with Subversion Book for this, "Basic Apache Configuration" topic)

You can instruct Apache to delegate the handling of all URLs... to a DAV provider whose repository is located at /var/svn/repository using the following httpd.conf syntax:

<Location ...>
  ...
  SVNPath /var/svn/repository
</Location>

Note - /var/svn/repository in example is directory, which contain immediately our single repository

Viola! Task solved?!

When VisualSVN team tell about

not changing the httpd.conf file

they have in mind (I think) the need for the user

  • have a copy of customized httpd.conf, because on every VisualSVN Server update httpd.conf will be replaced with default
  • self-integrate their own changes to changed by developers configuration
  • be intelligent and smart and don't complaint to VisualSVN team about troubles, caused by local changes, not by problems in vanulla product

Upvotes: 1

Related Questions