0

I configured my svn repository to access it trough apache.

I can access it via any web browser with these addresses.

http://svn.domain.com
http://www.domain.com:3690

But when I'm trying to checkout with tortoiseSVN on windows or a command line on linux, the first one returns: "Unusable URI: it does not refer to this repository" and the second one runs for hours and ends with a timeout error. (I've also tried svn://domain.com which does the same thing)

I read that mod_rewrite can be for something in that issue, but I didn't see any way to solve that issue except by removing mod_rewrite.

But I need mod_rewirte for the websites on this server.

What is the problem?

Is there a way to run mod_dav_svn and mod_rewrite at the same time?

EDIT

The virtual host conf file looks like this:

<Directory /path/to/subdomain>
  DAV svn
  SVNPath /path/to/repos
  AuthType Basic
  AuthName "Repos Name"
  AuthUserFile /path/to/auth-user/file
  Require valid-user
</Directory>

I added this to httpd.conf file:

Listen 3690
NameVirtualHost *:3690

<VirtualHost *:3690>
  ServerName svn.domain.com
  <Location />
    DAV svn
    AuthType Basic
    AuthName "Repos Name"
    AuthUserFile /path/to/auth-user/file
    SVNPath /path/to/repos
    Require valid-user
  </Location>
</VirtualHost>
Marm
  • 863
  • 2
  • 15
  • 30

2 Answers2

0

You cannot check out a domain name, and you cannot change the protocol and expect the server on the other end to suddenly start talking that new protocol.

Your website is making a SVN request to the SVN server, and then formatting the request as HTML. That means that http://svn.domain.com is not the SVN URL. You need to find out what is the SVN URL, and it will contain at least a project name, like so protocol://server/projectname

mod_rewrite is a good tool for automatically rewriting one URL into another; however, if you use mod_rewrite at this point in time, you will only hide your mod_dav_svn configuration issue under a layer which is programatically rewriting your urls. It's a lot harder to fix it that way, because you introduce a new issue (Is the URL rewriting broken?) without fixing the first issue.

Edwin Buck
  • 69,361
  • 7
  • 100
  • 138
  • I configured apache to listen port 3690 and I also configured the svn subdomain and they both point to an svn project. The page displayed in the web browser is the repository page I always worked with. – Marm Sep 10 '12 at 16:20
  • My URL rewriting is not broken. The rules are made in htaccess files on each domain. So they should not affect the svn subdomain or the port redirection right? – Marm Sep 10 '12 at 16:22
  • The URL isn't a full URL. It's a domain name, relying on a server configured values to provide the resource. SVN serves up more than one project, per server. – Edwin Buck Sep 10 '12 at 16:26
  • I've made these urls to point to a specific project. The urls works fine, on a web browser I have the svn page: Project - Revision 1: / and the file listing. – Marm Sep 10 '12 at 16:54
0

Okay, why are you using port 3690 for HTTP?

Subversion can use several different protocols for accessing the repository. However, you can't mix-n-match. If you are using Apache HTTP as your server, you can only use the HTTP protocol:

$ svn co http://svn.domain.com/<srvrInst>/path/to/your/repository

In Apache, after the domain, there's usually the server instance since multiple server instances can connect to a single Apache instance. Most of the time, it's simply svn although I've seen source used. This is configured in your Apache HTTP configuration.

Basically, any directory you can browse in a web browser should allow you to check it out. However, there is an exception if you have SVNListParentPath on. The parent directory of all of your repositories can't be checked out. Otherwise, you can checkout any directory you can browse to.

It is possible to serve the same repository via svnserve and Apache http at the same time. If you do that, you can use either the Apache http protocol or the svn protocol.

If this doesn't answer your issue, you'll have to give us more information. For example, what does your Apache http configuration look like. What URL can you browse, but not checkout? Remember under Subversion, you can only checkout directories and not files. If you need a file, you can use svn cat to the file and redirect the output to a file.


The virtual host conf file looks like this:

<Directory /path/to/subdomain>
  DAV svn
  SVNPath /path/to/repos
  AuthType Basic
  AuthName "Repos Name"
  AuthUserFile /path/to/auth-user/file
  Require valid-user

I believe your problem is the Directory directive itself. That's suppose to specify the directory under your domain where your repository is located. Normally, it's just something like svn or source, so you would do this to checkout: $ svn co http://svn.domain.com/svn/repo or $ svn co http://svn.domain.com/source/repo. See where it comes in after your domain name in the URL?

I have never tried a multi-level directory like that. Do you want people to specify http://svn.domain.com/path/to/subdomain/repo to do a checkout? Checkout URLs are pretty long already, so I can't imagine adding even more directories to the thing.

You say you can browse the repository via the web browser. If that's the case, you should be able to cut that URL out from the web browser (as long as it's a directory and not a file) and paste it into either Tortoise or the Subversion command line.

By the way, I see you have AuthUserFile set. Maybe the issue is that you need to specify the user name and password? Leave out the virtual host listening in on port 3690 for now. If you really want to use that port, run svnserve on your repository server, and let people use the snv:// protocol.

David W.
  • 105,218
  • 39
  • 216
  • 337
  • Look at my post edit for conf files content. svn.domain.com already point to the repos directory. I added the port 3690 because with http protocol, it doesn't work. It is not required for me, but it does the same thing with or without for the http access. – Marm Sep 10 '12 at 18:02
  • What does the SVNListParentPath do? – Marm Sep 10 '12 at 18:03
  • If you have a bunch of separate repositories, you can use `SVNParentPath` to specify the parent directory of all the repos, then use a single virtual directory for all of them. If you set `PSVNListParentPath` to `on`, you can use a web-browser to that virtual directory, and it will list all the repositories. You can't do that with the command line, and you can't checkout that virtual directory. It's just a web browser bonus. – David W. Sep 10 '12 at 21:18
  • See the appendage to my post above. – David W. Sep 10 '12 at 21:31