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 "/projects">
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /home/trac
PythonOption TracUriRoot /projects
</Location>
# You need something like this to authenticate users
<LocationMatch "/[^/]+/login">
AuthType Basic
AuthName "Trac"
AuthUserFile /home/trac/.htaccess
Require valid-user
</LocationMatch>
<LocationMatch "/(trac|icons)">
SetHandler None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</LocationMatch>
</VirtualHost>
EOF