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.

So, I've followed every tutorial I can find on Google and still can't get this to work. Below is the subversion.conf file I have in my conf.d folder of my server.

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

<VirtualHost *:80>
        DocumentRoot /home/svn.example.com
        ServerName svn.example.com
        ServerAlias svn.example.com

        <Location /repo>
                DAV svn
                SVNParentPath   /home/svn.example.com/repo
        </Location>
</VirtualHost>

I already installed subversion via yum as well as dav_svn.

I just want to access my repository without security yet...I'll add that shortly, but right now the result is that I get the default Apache HTTP Server Test Page that indicates the server is installed but there are no files in the directory. What am I doing wrong?

share|improve this question

migrated from stackoverflow.com Nov 16 '11 at 8:12

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

add comment

1 Answer

Intro

  1. You have unfinished jobs on Apache and Subversion sides
  2. In order to repositories after all you have to create at least one

Details

Extraction from my Apache config for http-served repo (in "main site", but it does not matter in this case), edited for your paths

LoadModule dav_module mod_dav.so
LoadModule dav_svn_module mod_dav_svn.so
...
<Directory />
...
  RewriteEngine on
  RewriteCond %{REQUEST_URI} ^/repo$
  RewriteRule ^(.*/repo)$ %1/ [R=301,L]
</Directory>
<Location /repo/>
  DAV svn

  SVNListParentPath on
  SVNParentPath /home/svn.example.com/repo
  • dav_module needed for dav_svn_module
  • All repos will be under URL http://svn.example.com/repo/*, not in root, rewrite rule in root will redirect all requests from root to DAV-SVN served location.
  • BTW - place repositories inside web-space is bad idea (security in mind), SVNParentPath can define place outside site. But I'll proceed with your old path here
  • SVNListParentPath on allow to show listing of repos in ordinary browser
  • Don't forget chmod|chgrp correctly repo root - Apache-user must have rights read-write into repos, you probably also want to have local access to repositories

Here Apache-side we can consider as finished (TBT!)

Subversion side:

  • cd /home/svn.example.com/repo
  • mkdir repo1
  • svnadmin create /home/svn.example.com/repo/repo1
  • repeat mkdir + svnadmin create for all needed repos

Final steps

share|improve this answer
add comment

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.