[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: http access...

From: bruce <bedouglas_at_earthlink.net>
Date: 2006-10-05 20:29:59 CEST

hi madison..

thanks for the reply... the problem/issue i'm having is that for some
reason, my setup seems to want to find the "Location" "/svn" under the
docroot "/www/var/html".. as far as i can tell, shouldn't the location
"/svn" be mapped to the svnparentpath "/svnroot" so i should be able to do
http://192.168.1.1/svn/test1 which would map to '/svnroot/test1'

can you tell me if your "svn" repositories are in/outside of your docroot
path/dir structure

thanks

-----Original Message-----
From: Madison Kelly [mailto:linux@alteeve.com]
Sent: Thursday, October 05, 2006 11:09 AM
To: bedouglas@earthlink.net
Cc: users@subversion.tigris.org
Subject: Re: http access...

bruce wrote:
> hi...
>
> ok. somewhere i've screwed up, or forgot something.. i thought i had
tested
> this awhile ago.
>
> i'm trying to set up a test to access a repository via http/apache.
>
> the test repository is outside the normal http doc root '/var/www/html'.
the
> test repo is '/svnroot'. the actual test svn is /svnroot/test1. i can
access
> this via 'svn list file:///svnroot/test1'.
>
> i have the following section in the http.conf file:
>
> #test svn app
> <Location /svn1>
> Order allow,deny
> Allow from all
> DAV svn
> SVNParentPath /svnroot
> # SVNPath /gforge-svn/troy/svn
> # AuthzSVNAccessFile /svnroot/conf/authz
>
>
> # Require valid-user
> # AuthType Basic
> # AuthName "svn test"
> # AuthUserFile /svnroot/conf/passwd
> </Location>
>
> i try to access it via http://102.168.0.1/svn1/test1
>
> i get an error in the httpd err log saying it can't find the
> /var/www/html/svn1 dir.....
>
> i was under the impression that i should be able to use a simple browser
to
> be able to access/view files in a repository without needing
> websvn/webcvs/etc...
>
> any thoughts/comments/help....
>
> if i could see someone's httpd.conf file, as well as how you access the
> repository, and the repository physical location, i can try to figure out
> what's going on.
>
> thanks

I've always found examples worked best for me, so given that I am
somewhat new to SVN myself I'll post my (working) httpd.conf file
(relevant parts, anyway). Note that I am on FreeBSD so paths may seem
odd, adjust accordingly. Some may not be needed as I am running WebSVN
(like the PHP module, iirc)

-=-=-=-=-=-
LoadModule dav_module /usr/local/libexec/apache2/mod_dav.so
LoadModule dav_svn_module /usr/local/libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module /usr/local/libexec/apache2/mod_authz_svn.so
LoadModule php5_module /usr/local/libexec/apache2/libphp5.so

...

DocumentRoot "/var/www"
<Directory "/var/www">
     Options Indexes FollowSymLinks ExecCGI Includes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>

DirectoryIndex index.html index.php index.html.var
AccessFileName .htaccess

# SVN Repos
<Location /svn>
         DAV svn
         SVNParentPath /var/svn
         AuthzSVNAccessFile /etc/svn-access-file
         AuthType Basic
         AuthName "Synaptic Subversion Repositories"
         AuthUserFile /etc/svn-auth-file
         Require valid-user
</Location>
-=-=-=-=-=-

   And here are my notes to myself I wrote while installing SVN; again,
ymmv :)

-=-=-=-=-=-
-=] Server setup [=-
### On the server: ###
- When installing via 'ports', install Apache20 using 'make
WITH_BERKELEYDB=db4'
   and install subversion with 'make WITH_MOD_DAV_SVN=yes'.

- Setup Apache by adding ('/svn' is where the various projects are stored):
LoadModule dav_module /usr/local/libexec/apache2/mod_dav.so
LoadModule dav_svn_module /usr/local/libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module /usr/local/libexec/apache2/mod_authz_svn.so
...
# SVN Repos
<Location /svn>
        DAV svn
        SVNParentPath /var/svn
        AuthzSVNAccessFile /etc/svn-access-file
        AuthType Basic
        AuthName "Synaptic Subversion Repositories"
        AuthUserFile /etc/svn-auth-file
        Require valid-user
</Location>

- Now setup authentication (use '-c' first time only to create the file):
# htpasswd -cm /etc/svn-auth-file user1
<pass>
<pass>
# htpasswd -m /etc/svn-auth-file user2
<pass>
<pass>
...

- Now create the file '/etc/svn-access-file' and add data like:
-=] Start '/etc/svn-access-file' [=-
[groups]
test = user1
cdx = user1,user2

[test:/]
@test = rw
* = r

[cdx:/]
@cdx = rw
* = r

# Permissions are inherited, so I could open up a directory to the
'test' group like this:
#[cdx:/testing]
#@test = rw
-=] End '/etc/svn-access-file' [=-

-=] Create a repository [=-
- Once installed, create your project repository path and run:
# svnadmin create /path/to/repo

### On the client: ###
-=] Prepare the Project [=-
- Create the directory with the project files:
# mkdir ./project/trunk
                ./tags
                ./branches

- Copy your project into './project/trunk'.
- Now run the initial import:
# cd ./project
# svn import . http://<url>/path/to/<project> -m "Initial import."
- Once imported, delete your copy:
# cd ..
# rm -rf ./project
- Now checkout the project from SVN (to get revision info)
# svn co http://<url>/path/to/<project>

Done!!!

To install 'ViewVC'
- # cd /usr/ports/devel/viewvc && make && make install
- # cp /usr/local/viewvc/viewvc.conf.dist /usr/local/viewvc/viewvc.conf
- Edit /usr/local/viewvc/viewvc.conf as documented
- # cp /usr/local/viewvc/bin/cgi/* /path/to/cgi-bin
- Install Subversion Python bindings
- # cd /usr/ports/devel/subversion-pytong && make && make install
-=-=-=-=-=-

HTH!

Madi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Oct 5 20:32:45 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.