rendered paste bodycat > /etc/apache2/sites-available/$prjname-projects << EOF
<VirtualHost 192.168.33.3>
ServerName projects.$prjname.usyd.edu.au
ServerAdmin webmaster@localhost
DocumentRoot $tracpath
<Directory $tracpath>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
</Directory>
ErrorLog /var/log/apache2/$prjname-projects-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/$prjname-projects-access.log combined
ServerSignature On
Alias /icons/ "/usr/share/apache2/icons/"
<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Removed (Using mod_python)
#
# <Location "/cgi-bin/trac.cgi">
# SetEnv TRAC_ENV "/var/www/$prjname-projects"
# </Location>
Alias /trac "/usr/share/trac/htdocs"
<Location /$prjname-projects>
SetHandler mod_python
PythonHandler trac.ModPythonHandler
PythonOption TracUriRoot "/"
PythonOption TracEnv $tracpath
</Location>
# You need something like this to authenticate users
<Location /$prjname-projects/login>
AuthType Basic
AuthName "$prjname projects"
AuthUserFile $tracpath/$prjname.htpasswd
Require valid-user
</Location>
<LocationMatch "/(trac|icons)">
SetHandler None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</LocationMatch>
</VirtualHost>