# Custom IVLE Apache config script
# Configures IVLE at the root of the site.
NameVirtualHost *:80
ServerAdmin ADMIN@EXAMPLE.COM
ServerName IVLE.EXAMPLE.COM

<VirtualHost *:80>
    DocumentRoot /usr/local/share/ivle/www
    ServerName localhost
    ServerAlias public.localhost
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory "/usr/local/share/ivle/www/">
        AllowOverride None
        Order allow,deny
        allow from all
        SetHandler mod_python
        PythonHandler ivle.dispatch
        #PythonDebug On
        Options FollowSymLinks
        PythonOption mod_python.file_session.database_directory /var/lib/ivle/sessions
        PythonOption mod_python.session.cookie_name ivle
    </Directory>
    <Directory "/usr/local/share/ivle/www/php">
        SetHandler None
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On
</VirtualHost>

<VirtualHost *:80>
  ServerName svn.localhost
  <Location /users>
    DAV svn
    SVNParentPath /var/lib/ivle/svn/repositories/users
    AuthzSVNAccessFile /var/lib/ivle/svn/svn.conf
    Require valid-user
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /var/lib/ivle/svn/ivle.auth
  </Location>
  <Location /groups>
    DAV svn
    SVNParentPath /var/lib/ivle/svn/repositories/groups
    AuthzSVNAccessFile /var/lib/ivle/svn/svn-group.conf
    Require valid-user
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /var/lib/ivle/svn/ivle.auth
  </Location>
</VirtualHost>

