# RPI GameDeb Club Website

<VirtualHost *:80>
    DocumentRoot /var/www/gamedev/htdocs
    ServerName gamedev.union.rpi.edu
    ServerAlias gamedev.coderanger.net
    ServerAdmin gamedev@union.rpi.edu
    <Directory /var/www/gamedev/htdocs>
        Allow from all
    </Directory>

    # Root directory handler
    <Location />
        SetHandler mod_python
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnv /var/www/gamedev/tracs/main
        PythonOption TracUriRoot /
        SetEnv PYTHON_EGG_CACHE /var/www/gamedev/.trac-plugins-cache
        PythonInterpreter trac
    </Location>

    # Parent handler
    <Location /projects>
        PythonOption TracEnv ""
        PythonOption TracEnvParentDir /var/www/gamedev/tracs
        PythonOption TracUriRoot /projects
    </Location>

    # Logins
    #<LocationMatch ^/([^/]+/)?login>
    #    AuthType Basic
    #    AuthName "RPI Game Development Club Login"
    #    AuthUserFile /var/www/gamedev/passwds
    #    Require valid-user
    #</LocationMatch>
    
    <Location /svn>
        DAV svn
        SVNParentPath /var/www/gamedev/repos
        SVNIndexXSLT /static/svnindex.xsl
        SVNListParentPath on

        AuthType Basic
        AuthPam_Enabled Off
        AuthName "RPI Game Development Club Login"
        PythonAuthenHandler mod_auth_acctmgr.handler
        PythonInterpreter trac
        
        # For any operations other than these, require an authenticated user.
        <LimitExcept GET PROPFIND OPTIONS REPORT>
            Require valid-user
        </LimitExcept>        
    </Location>
    
    Alias /static /var/www/gamedev/htdocs
    <Location /static>
        SetHandler None
        Options +Indexes
    </Location>
    <Location /favicon.ico>
        SetHandler None
    </Location>
    
</VirtualHost>

# HTTPS VHost
<VirtualHost *:443>
    ServerName gamedev.union.rpi.edu
    ServerAlias gamedev.coderanger.net
    DocumentRoot /var/www/gamedev/htdocs
 
    # Relay to main vhost
    RewriteEngine on
    RewriteRule (.*) http://gamedev.coderanger.net$1 [P]
</VirtualHost>
