Problems with Apache config to support SVN

1,028 views
Skip to first unread message

Arthur Pesa

unread,
Feb 9, 2011, 1:31:02 PM2/9/11
to us...@subversion.apache.org
Hello, I have posted this on a couple boards over the last weekend and
can't seem to get an answer. I have the following Dev environment in
which I am trying to connect to an SVN repo on the local machine.

Ubuntu 10.04
Eclipse w/subversive plugins
Apache (LAMP)
Subversion installed

I have installed everything using synaptic or apt from existing
supported packages. I have created an SVN repo and can see it in the
filesystem. I have configured the Apache server as found below in
httpd.conf:

##
## httpd.conf
##
DocumentRoot "/var/www"
#
##Subversion Configuration
##
Servername "superglts"
#
Alias /SVN /home/apesa/Development/SVN
#
<Directory /home/apesa/Development/SVN>
AllowOverride All
DAV svn
Order allow,deny
Allow from all
</Directory>
#
<Location /SVN>
DAV svn
SVNListParentPath on
SVNParentPath "/SVN"
AuthName "SVN"
AuthType Basic
SVNPathAuthz off
AuthBasicProvider file
AuthUserFile "/home/apesa/Development/passwords"
Require valid-user
</Location>

Right now the error I am getting from Eclipse is:

"Location Information is specified incorrectly"
svn: Malformed XML
Keep Location Anyway

I am using a password file created with htpasswd that is working. It
will recognize invalid users and will bump them while it passes me so I
believe that is working as expected.

I created the svn Repo with the following syntax:
$svnadmin create /home/apesa/Development/SVN

I can see this in the filesystem and it appears to be ok. I am hoping
that someone will recognize my mistakes.

Thanks,
Pat

Ryan Schmidt

unread,
Feb 9, 2011, 2:41:31 PM2/9/11
to Arthur Pesa, us...@subversion.apache.org
On Feb 9, 2011, at 12:31, Arthur Pesa wrote:

> Alias /SVN /home/apesa/Development/SVN

Remove this "Alias" line.


> <Directory /home/apesa/Development/SVN>
> AllowOverride All
> DAV svn

Remove this "DAV" line.


> <Location /SVN>
> DAV svn
> SVNListParentPath on
> SVNParentPath "/SVN"

[snip]

> I created the svn Repo with the following syntax:
> $svnadmin create /home/apesa/Development/SVN

The SVNParentPath line should read "SVNParentPath /home/apesa/Development" if you are going to create other repositories (or "SVNPath /home/apesa/Development/SVN" if you only are going to have this single repository).


Arthur Pesa

unread,
Feb 9, 2011, 11:12:18 PM2/9/11
to Ryan Schmidt, us...@subversion.apache.org
Thanks for the help, I removed the DAV reference in <DIRECTORY> and
removed the Alias reference and added that path to the Repo in
SVNParentPath as suggested. I am, still getting the same error.

Location Information has been specified incorrectly
Svn: Malformed XML
Keep Location Anyway

This is all the Apache config I have:

<Directory /home/apesa/Development/SVN>
AllowOverride All


Order allow,deny
Allow from all
</Directory>
#

<Location /SVN>
DAV svn
SVNListParentPath on

SVNParentPath "/home/apesa/Development"


AuthName "SVN"
AuthType Basic
SVNPathAuthz off
AuthBasicProvider file
AuthUserFile "/home/apesa/Development/passwords"
Require valid-user
</Location>

Am I missing some corresponding configuration in the Repo?

Pat

Roch Auburtin

unread,
Feb 9, 2011, 11:37:05 PM2/9/11
to Arthur Pesa, us...@subversion.apache.org
Could you try to remove:
<Directory ...> </Directory>
AuthBasicProvider file
SVNPathAuthz off

Arthur Pesa

unread,
Feb 10, 2011, 12:19:49 AM2/10/11
to Roch Auburtin, us...@subversion.apache.org
Same error message from Eclipse. Same debug and error messages in the
error.log.
I am going to double check the plugins, but I have already gone through
all of them. Here is some error logging from Apache.

[Wed Feb 09 21:17:26 2011] [debug] mod_deflate.c(615): [client
127.0.0.1] Zlib: Compressed 476 to 322 : URL /SVN

[Wed Feb 09 21:17:26 2011] [error] [client 127.0.0.1] Could not fetch
resource information. [301, #0]

[Wed Feb 09 21:17:26 2011] [error] [client 127.0.0.1] (2)No such file or
directory: Requests for a collection must have a trailing slash on the
URI. [301, #0]

[Wed Feb 09 21:17:26 2011] [debug] mod_deflate.c(615): [client
127.0.0.1] Zlib: Compressed 304 to 223 : URL /SVN

[Wed Feb 09 21:17:26 2011] [error] [client 127.0.0.1] Could not fetch
resource information. [301, #0]

[Wed Feb 09 21:17:26 2011] [error] [client 127.0.0.1] (2)No such file or
directory: Requests for a collection must have a trailing slash on the
URI. [301, #0]

Thanks,
Pat

Arthur Pesa

unread,
Feb 10, 2011, 12:25:39 AM2/10/11
to Roch Auburtin, us...@subversion.apache.org
Ok, Thanks to all who answered.. It was the URL, instead of
http://localhost/SVN it is http://localhost/SVN/SVN . It must be due to
the SVNParentPath?? ANyway, I am connected and it works..

Many thanks,
Pat

Ryan Schmidt

unread,
Feb 10, 2011, 2:31:02 AM2/10/11
to Arthur Pesa, Roch Auburtin, us...@subversion.apache.org

On Feb 9, 2011, at 23:25, Arthur Pesa wrote:

> Ok, Thanks to all who answered.. It was the URL, instead of
> http://localhost/SVN it is http://localhost/SVN/SVN . It must be due to
> the SVNParentPath?? ANyway, I am connected and it works..

Yes, http://localhost/SVN/SVN would be the correct URL for the way you configured it:


>>>> <Location /SVN>
>>>> DAV svn
>>>> SVNListParentPath on
>>>> SVNParentPath "/home/apesa/Development"

The above says: "For the location /SVN (meaning, for the URL http://localhost/SVN/), allow me to tack on the name of any repository in the directory /home/apesa/Development", and you showed earlier that you created a repository called "SVN". Repository name "SVN" tacked onto the end of http://localhost/SVN/ gives http://localhost/SVN/SVN.

If you want to create multiple repositories, consider renaming your existing repository named "SVN" to something else that more clearly communicates what it's for (for example "websites" or "internal-projects", or you could create one repository for each project and name the repository after that project). To rename the repository, you can simply rename its directory using normal OS commands. Then you would have http://localhost/SVN/websites or http://localhost/SVN/someproject.

Or, if you just want a single repository (and that's fine too), consider using "SVNPath /home/apesa/Development/SVN" instead. Then your URL to your repository is just http://localhost/SVN.

Also, consider using <Location /svn> instead of <Location /SVN>. Most users don't expect uppercase characters in URLs, and URLs are case-sensitive.


Arthur Pesa

unread,
Feb 10, 2011, 2:49:38 AM2/10/11
to Ryan Schmidt, Roch Auburtin, us...@subversion.apache.org
Thanks for the explanation on parentpath and advice on repos. When I
first laid out my repos I had 3 but I was having trouble connecting so I
removed all but one that I called SVN, I actually uppercased it so it
would stick out in the debug log and other possible error messaging. I
figured I could make all my mistakes here and then go back and lay out
the 3 repos and connect them.

I now have 2 machines working from the same source so I figure tomorrow
I will recreate my original repo layout and configure Apache for those
three. I have used CVS before so I have some exp in the copy merge
model... This will work well.

Thanks again.

Reply all
Reply to author
Forward
0 new messages