Ubuntu – Configure SVN Server and Trac on Ubuntu

svntortoisesvntracUbuntu

I would like to configure my Ubuntu Machine as local web server for multiple project handling.

Am bit confused about the URL/Folder structure of my above system.

I wish to get something like following.

http://localserver/svn/ – will manage the svn.

http://localserver/trac/ – will manage all Trac system.

How can i configure these for multiple project.

http://localserver/svn/project1 – is this possible from a single svn server/trac installation or
http://localserver/trac/project1/ ?????

and so on.. or any other easy method to handle these features together for handle multiple project.??

Thanks in advance!!

Best Answer

i currently run multiple trac environments with various different trac versions, including multirepos branch. 0.11 tracs obviously have a single svn repo, while a couple of my multirepos envs have >1 repos attached.

svn is served through apache mod_dav_svn (not svnserve) and i'm using apache authnz_ldap for authentication to everything.

https://server/project/name is my trac project tree https://server/svn/name is my svn repo tree

authentication configuration is very similar for both:

apache-trac.conf:

<LocationMatch /project[^/]*>
        AuthType        Basic
        AuthName        "Security"

        <IfModule authnz_ldap_module>
                AuthBasicProvider ldap
                AuthLDAPURL     ldap://server:389/ou=Users,ou=OxObjects,dc=server,dc=domain.net?uid
                AuthLDAPGroupAttribute memberUid
                AuthLDAPGroupAttributeIsDN off
        </IfModule>
</LocationMatch>

# For accessing project list

<Location /project>
       Deny from all
       Allow from 127.0.0.1 192.168.1. 10.24.0.

       Require ldap-group      cn=group, ou=Groups,ou=OxObjects,dc=server,dc=domain.net
</Location>

# Individual project access

<Location /project/foo1>
        Allow from 10.24.0. 192.168.1. 127.0.0.1 somerandomhost.com

        Require ldap-group      cn=visitor, ou=Groups,ou=OxObjects,dc=server,dc=domain.net
        Require user    "andy"
        Require user    "richard"
        Require user    "sam"
        Require user    "bar"
</Location>

apache-svn.conf:

<IfDefine DAV>
<IfDefine SVN>
    <IfModule !mod_dav_svn.c>
            LoadModule dav_svn_module       modules/mod_dav_svn.so
    </IfModule>

    <LocationMatch /svn[^/]*>
            AuthType        Basic
            AuthName        "Security"

            <IfModule authnz_ldap_module>
                    AuthBasicProvider ldap
                    AuthLDAPURL     ldap://server:389/ou=Users,ou=OxObjects,dc=server,dc=domain.net?uid
                    AuthLDAPGroupAttribute memberUid
                    AuthLDAPGroupAttributeIsDN off
            </IfModule>
    </LocationMatch>

    <Location /svn>
            DAV svn
            SVNParentPath /secure/svn
            require         user "sam"
            require         user "richard"

            Order deny,allow
            Deny from all
            Allow from 192.168.1. 10.24.0. 127.0.0.1

            Require ldap-group      cn=group, ou=Groups,ou=OxObjects,dc=server,dc=domain.net

            Satisfy All
    </Location>

    <IfDefine SVN_AUTHZ>
            <IfModule !mod_authz_svn.c>
                    LoadModule authz_svn_module     modules/mod_authz_svn.so
            </IfModule>
    </IfDefine>
</IfDefine>
</IfDefine>

this configuration could probably be consolidated with regexps, havent gotten around to it.

Related Topic