# apache subversion modules

## thecooptoo

im trying to get subversion to work with apache .

Ive got to the stage of adding control lists. What am i missing to get this going ?

```
gravity modules # /etc/init.d/apache2 start

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 17 of /etc/apache2/modules.d/47_mod_dav_svn.conf:

Invalid command 'AuthzSVNAccessFile', perhaps misspelled or defined by a module not included in the server configuration

gravity modules #            
```

and ive got 2 repositories set up

```
gravity modules # cat /etc/apache2/modules.d/47_mod_dav_svn.conf |grep -v '#'

<IfDefine SVN>

LoadModule dav_svn_module modules/mod_dav_svn.so

<IfDefine SVN_AUTHZ>

LoadModule authz_svn_module modules/mod_authz_svn.so

</IfDefine>

<Location /svn>

        DAV svn

SVNParentPath /var/svn/repos

        AuthType Basic

        AuthName "Subversion repository"

        AuthUserFile /var/svn/conf/svnusers

        AuthzSVNAccessFile /var/svn/conf/svnauth

</Location>

<Location /documents>

DAV svn

</Location>

<Location /doc>

DAV svn

</Location>

</IfDefine>

gravity modules #   

    
```

ive recompiled apache a couple of times to try and get this correct 

```
gravity modules # cat /etc/make.conf |grep -i use

USE="accessibility arts aiglx alsa apache2 ctype dbus doc dri dvdr dvd dvdread encode esd ffmpeg gif gtk hal imap imaps java jpeg kde mp3 mmx mmx2 mysql nsplugin opengl oss pam pcre perl pop3 ps png -qt-static qt3 qt3support qt4 readline server session sse sse2 ssl subversion truetype tk udev unicode ups vorbis vcd vlm vnc win32codecs vorbisX jpeg  xml wxwindows zlib "

INPUT_DEVICES ="keyboard mouse"

#APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias"

APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_file authz_default authz_groupfile authz_host authz_user autoindex cache dav dav_lock dir env expires headers include info log_config logio mime negotiation proxy rewrite setenvif speling status userdir usertrack"

gravity modules # 

gravity paul # ls /usr/lib/apache2/modules/

libphp4.so         mod_auth_digest.so      mod_authz_svn.so   mod_dav_lock.so  mod_include.so     mod_negotiation.so  mod_status.so

libphp5.so         mod_authn_file.so       mod_authz_user.so  mod_dav_svn.so   mod_info.so        mod_proxy.so        mod_userdir.so

mod_actions.so     mod_authnz_ldap.so      mod_autoindex.so   mod_dir.so       mod_ldap.so        mod_rewrite.so      mod_usertrack.so

mod_alias.so       mod_authz_default.so    mod_cache.so       mod_env.so       mod_log_config.so  mod_setenvif.so

mod_asis.so        mod_authz_groupfile.so  mod_cgi.so         mod_expires.so   mod_logio.so       mod_speling.so

mod_auth_basic.so  mod_authz_host.so       mod_dav.so         mod_headers.so   mod_mime.so        mod_ssl.so

gravity paul #               
```

----------

## thecooptoo

my apache config 

```
gravity paul # cat /etc/make.conf | grep ^APACHE

APACHE2_MPMS="prefork"

APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_file authz_default authz_groupfile authz_host authz_user autoindex cache dav dav_lock dir env expires headers include info log_config logio mime negotiation proxy rewrite setenvif speling status userdir usertrack"

```

my mod_dav config . apache wont start .

```
gravity paul # cat /etc/apache2/modules.d/47_mod_dav_svn.conf | grep -v '#'

<IfDefine SVN>

LoadModule dav_svn_module modules/mod_dav_svn.so

<IfDefine SVN_AUTHZ>

LoadModule authz_svn_module modules/mod_authz_svn.so

</IfDefine>

<Location /svn>

        DAV svn

SVNParentPath /var/svn/repos

        AuthType Basic

        AuthName "Subversion repository"

        AuthUserFile /var/svn/conf/svnusers

        AuthzSVNAccessFile /var/svn/conf/svnauth

</Location>

<Location /documents>

DAV svn

</Location>

<Location /doc>

DAV svn

</Location>

</IfDefine>

gravity paul # /etc/init.d/apache2 restart

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 17 of /etc/apache2/modules.d/47_mod_dav_svn.conf:

Invalid command 'AuthzSVNAccessFile', perhaps misspelled or defined by a module not included in the server configuration
```

if i comment out the part of the config file  and force the loading of the module , apache starts

```
gravity paul # cat  /etc/apache2/modules.d/47_mod_dav_svn.conf

<IfDefine SVN>

LoadModule dav_svn_module modules/mod_dav_svn.so

#<IfDefine SVN_AUTHZ>

LoadModule authz_svn_module modules/mod_authz_svn.so

#</IfDefine>
```

 but i get an error message when I try and access the repository

```

gravity paul # svn co --username testuser http://localhost/svn/doc

svn: PROPFIND request failed on '/svn/doc'

svn: PROPFIND of '/svn/doc': 403 Forbidden (http://localhost)

gravity paul # cat /var/svn/conf/svnusers | grep test

testuser:8xT0caAF5Aruc

gravity paul # gravity paul # cat /var/svn/conf/svnusers | grep test

bash: gravity: command not found

gravity paul # testuser:8xT0caAF5Aruc

```

i think its apache not loading/handling the modules correctly . How do i debug this further ?

EDIT: i can list the loaded modules

```

gravity paul # /usr/sbin/apache2 -M

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Loaded Modules:

 core_module (static)

 mpm_prefork_module (static)

 http_module (static)

 so_module (static)

 actions_module (shared)

 alias_module (shared)

 asis_module (shared)

 auth_basic_module (shared)

 authn_file_module (shared)

 authz_default_module (shared)

 authz_groupfile_module (shared)

 authz_host_module (shared)

 authz_user_module (shared)

 autoindex_module (shared)

 cgi_module (shared)

 dir_module (shared)

 env_module (shared)

 expires_module (shared)

 headers_module (shared)

 include_module (shared)

 log_config_module (shared)

 logio_module (shared)

 mime_module (shared)

 negotiation_module (shared)

 rewrite_module (shared)

 setenvif_module (shared)

 speling_module (shared)

 usertrack_module (shared)

Syntax OK

gravity paul #               
```

so it doesnt like the #<IfDefine SVN_AUTHZ> line

----------

