--- /dev/null
+# Citylink Mirror
+deb http://ftp.nz.debian.org/debian/ etch main non-free
+deb-src http://ftp.nz.debian.org/debian/ etch main
+
+# Catalyst Packages
+deb http://debian.catalyst.net.nz/catalyst stable catalyst
+
+# Security Updates
+deb http://security.debian.org/ etch/updates main
+deb-src http://security.debian.org/ etch/updates main
--- /dev/null
+i am testfile one and i have been successfully copied into the vserver, congratulations!
--- /dev/null
+i am testfile two and i have been successfully copied into the vserver, congratulations!
--- /dev/null
+sudo
+vim
+ssh
+curl
+catalyst-martynsmith
+locales
+less
--- /dev/null
+# Copy martyn's password from the host
+grep -v '^martyn' ${VSROOT}/etc/shadow > /vserver/.shadow
+grep '^martyn' /etc/shadow >> /vserver/.shadow
+mv /vserver/.shadow ${VSROOT}/etc/shadow
+
+# Add a /etc/hosts entry on the HostOS
+cat /etc/hosts > /etc/hosts.new
+echo "${VSIPADDR} ${VSNAME}" >> /etc/hosts.new
+mv /etc/hosts.new /etc/hosts
--- /dev/null
+echo 'martyn ALL=(ALL) ALL' >> /etc/sudoers
+
--- /dev/null
+if [ "$VSRELEASE" = "sarge" ]; then
+ echo "running pwconv"
+ pwconv
+fi
+cp /usr/share/zoneinfo/NZ /etc/localtime
+echo '10.0.0.3 pg81' >> /etc/hosts
+echo '10.0.0.5 pg74' >> /etc/hosts
+echo "${VSIPADDR} ${VSNAME}" >> /etc/hosts
+echo 'locales locales/locales_to_be_generated select en_NZ ISO-8859-1, en_NZ.UTF-8 UTF-8' | debconf-set-selections
+
+
+echo 'debconf debconf/priority select critical' | debconf-set-selections
+echo 'exim4-config exim4/dc_eximconfig_configtype string mail sent by smarthost; no local mail' | debconf-set-selections
+echo 'exim4-config exim4/dc_smarthost string smtp.catalyst.net.nz' | debconf-set-selections
--- /dev/null
+parent =
+release = etch
+mirror = http://debian.catalyst.net.nz/debian
+inherit-aptsources = yes
+inherit-packages = yes
+inherit-pre-vserver = yes
+inherit-pre-host = yes
+inherit-post-vserver = yes
+inherit-post-host = yes
+inherit-files = yes
+inherit-templates = yes
--- /dev/null
+# Remove /etc/hosts entry on the host OS
+grep -v "^${VSIPADDR}" /etc/hosts > /etc/hosts.new
+mv /etc/hosts.new /etc/hosts
+
+grep -v "^${VSNAME}" /home/martyn/.ssh/known_hosts > /home/martyn/.ssh/known_hosts.new
+chown martyn:martyn /home/martyn/.ssh/known_hosts.new
+mv /home/martyn/.ssh/known_hosts.new /home/martyn/.ssh/known_hosts
--- /dev/null
+# Check out and set up the mahara install
+cg-clone "git+ssh://git.catalyst.net.nz/var/git/mahara.git#__PROFILEOPTION_branch__" mahara
+sudo chown __PROFILEOPTION_username__:__PROFILEOPTION_username__ config.php
+mv config.php mahara/htdocs/
+mkdir mahara/logs/
+sudo chown www-data:www-data mahara/logs
+mkdir mahara/.patches
+sudo mkdir /var/lib/mahara
+sudo chown www-data:www-data /var/lib/mahara
+
+sudo apachectl restart
+
+# Make this file owned by the user. Might be nicer if the permissions could be controlled by the 'files' file...
+sudo chown $USER:$USER .bash_once
--- /dev/null
+<?php
+/**
+ * This program is part of Mahara
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * @package mahara
+ * @subpackage core
+ * @author Penny Leach <penny@catalyst.net.nz>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
+ *
+ */
+
+$cfg = new StdClass;
+
+
+// database connection details
+$cfg->dbtype = 'postgres8';
+$cfg->dbhost = 'pg81';
+$cfg->dbport = 5432;
+$cfg->dbname = '__VSNAME__';
+$cfg->dbuser = 'martyn';
+$cfg->dbpass = '';
+$cfg->dbprefix = '';
+
+// wwwroot - the web-visible path to your Mahara installation
+// Normally, this is automatically detected - if it doesn't work for you
+// then try specifying it here
+//$cfg->wwwroot = 'http://myhost.com/mahara/';
+
+// dataroot - uploaded files are stored here
+// must be writable by the webserver and outside document root.
+// Mahara will NOT RUN if this is inside your document root, because
+// this is a big security hole.
+$cfg->dataroot = '/var/lib/mahara';
+
+// system mail address. emails out come from this address.
+// if not specified, will default to noreply@ automatically detected host.
+// if that doesn't work or you want something else, then specify it here.
+// $cfg->noreplyaddress = 'noreply@myhost.com'
+
+// Logging configuration
+// For each log level, you can specify where the messages are displayed.
+// LOG_TARGET_SCREEN makes the error messages go to the screen - useful
+// when debugging but not on a live site!
+// LOG_TARGET_ERRORLOG makes the error messages go to the log as specified
+// by the apache ErrorLog directive. It's probably useful to have this on
+// for all log levels.
+// You can combine them with bitwise operations,
+// e.g. LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG
+//
+// This configuration is suitable for people running Mahara for the first
+// time. You will immediately see environment errors, and so can correct
+// them. You will be able to see other debugging information in your error
+// logs. Once your site is up and running you might want to remove the
+// environment level logging completely, and just log everything else to
+// the error log.
+$cfg->log_dbg_targets = LOG_TARGET_ERRORLOG;
+$cfg->log_info_targets = LOG_TARGET_ERRORLOG;
+$cfg->log_warn_targets = LOG_TARGET_ERRORLOG;
+$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+// This configuration is suitable for developers. You will see all errors
+// and they will also be in the logs.
+//$cfg->log_dbg_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+//$cfg->log_info_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+//$cfg->log_warn_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+//$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+
+// The log levels that will generate backtraces. Useful for development,
+// but probably only warnings are useful on a live site.
+$cfg->log_backtrace_levels = LOG_LEVEL_WARN | LOG_LEVEL_ENVIRON;
+
+// mail handling
+// if you want mahara to use smtp servers to send mail, enter one or more here
+// blank means mahara will use the default PHP method.
+$cfg->smtphosts = 'smtp.catalyst.net.nz';
+// If you have specified an smtp server above, and the server requires authentication,
+// enter them here
+// $cfg->smtpuser = '';
+// $cfg->smtppass = '';
+?>
--- /dev/null
+NameVirtualHost *:80
+<VirtualHost *:80>
+ ServerName __VSNAME__.abelard.wgtn.cat-it.co.nz
+ DocumentRoot /home/__PROFILEOPTION_username__/mahara/htdocs
+
+ <Directory /home/__PROFILEOPTION_username__/mahara/htdocs>
+ AllowOverride all
+ </Directory>
+
+ ErrorLog /home/__PROFILEOPTION_username__/mahara/logs/error.log
+ CustomLog /home/__PROFILEOPTION_username__/mahara/logs/access.log full
+</VirtualHost>
--- /dev/null
+username
+branch
--- /dev/null
+apache
+libapache-mod-php5
+php5-pgsql
+php5-gd
+file
+clamav-daemon
+clamav-freshclam
+cogito
+make
+python
+sun-java5-jdk
+build-essential
+debhelper
+fakeroot
--- /dev/null
+# Create the database for the mahara install
+vserver pg81 suexec postgres createdb ${VSNAME} -Omartyn -EUNICODE
+
+# Remove the tmp filesystem mounting
+grep -v tmp /etc/vservers/${VSNAME}/fstab > /etc/vservers/${VSNAME}/fstab.new
+mv /etc/vservers/${VSNAME}/fstab.new /etc/vservers/${VSNAME}/fstab
--- /dev/null
+echo 'sun-java5-bin shared/accepted-sun-dlj-v1-1 boolean true' | debconf-set-selections
--- /dev/null
+parent = webserver
--- /dev/null
+# Drop the database
+vserver pg81 suexec postgres dropdb ${VSNAME}
--- /dev/null
+mahara.conf /etc/apache/conf.d/
+config.php /home/__PROFILEOPTION_username__/
+.bash_once /home/__PROFILEOPTION_username__/
--- /dev/null
+# Mahara
+deb http://debian.mahara.org/ unstable mahara
--- /dev/null
+echo 'debconf debconf/priority select critical' | debconf-set-selections
+echo 'mahara-apache2 mahara/db_host string pg81' | debconf-set-selections
+echo 'mahara-apache2 mahara/db_port string 5432' | debconf-set-selections
+echo "mahara-apache2 mahara/db_name string ${VSNAME}" | debconf-set-selections
+echo 'mahara-apache2 mahara/db_user string martyn' | debconf-set-selections
+echo "mahara-apache2 mahara/servername string ${VSNAME}.abelard.wgtn.cat-it.co.nz" | debconf-set-selections
+
+DEBCONF_FRONTEND=noninteractive apt-get install mahara-apache2 --assume-yes --force-yes
--- /dev/null
+vserver pg81 suexec postgres createdb ${VSNAME} -Omartyn -EUNICODE
+
--- /dev/null
+parent = webserver
--- /dev/null
+vserver pg81 suexec postgres dropdb ${VSNAME}
--- /dev/null
+# ~/.bash_once: sourced from .bash_profile then deleted
+#
+# include .bash_once if it exists, then remove it
+if [ -d ~/work/head/ ]; then
+ echo "running automatic cvs checkout"
+ cd /home/donj/work/head/
+ cvs co -d HEAD clients/nzrb/tab
+fi
--- /dev/null
+# ~/.bash_profile: executed by bash(1) for login shells.
+#
+# Catalyst Systems Administrator version - note that you
+# shouldn't customise this, since it will get overwritten
+# with a new version from your package. If you want local
+# actions on this machine put them into ~/.bash_profile_local
+# which is sourced at the end, if it is present.
+#
+
+DEBVERSION="`cat /etc/debian_version`"
+UTFVERSION="3.1"
+versions() {
+ cat /etc/debian_version
+ echo ${UTFVERSION}
+}
+
+if [ "`versions | sort | head -n 1`" = "${UTFVERSION}" ] ; then
+ LC_CTYPE=en_NZ.UTF-8
+ export LC_CTYPE
+
+ LC_ALL=en_NZ.UTF-8
+ export LC_ALL
+fi
+
+# set variable identifying the chroot you work in
+if [ -f /etc/debian_chroot ]; then
+ debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# include .bashrc if it exists
+if [ -f ~/.bashrc ]; then
+ . ~/.bashrc
+fi
+
+# set PATH so it includes user's private bin if it exists
+if [ -d ~/bin ] ; then
+ PATH=~/bin:"${PATH}"
+fi
+
+# include .bash_profile_local if it exists
+if [ -f ~/.bash_profile_local ]; then
+ . ~/.bash_profile_local
+fi
+
+# include .bash_once if it exists, then remove it
+if [ -f ~/.bash_once ]; then
+ . ~/.bash_once
+ rm ~/.bash_once
+fi
--- /dev/null
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+# don't put duplicate lines in the history. See bash(1) for more options
+export HISTCONTROL=ignoreboth
+export HISTSIZE=1000
+
+# git environment stuff
+export GIT_AUTHOR_NAME='Donovan Jones'
+export GIT_COMMITTER_NAME='Donovan Jones'
+export GIT_COMMITTER_EMAIL='donovan@catalyst.net.nz'
+export GIT_AUTHOR_EMAIL='donovan@catalyst.net.nz'
+
+# cvs environment stuff
+export CVSROOT=':ext:donj@cvs.catalyst.net.nz:/cvs'
+export CVS_RSH='/usr/bin/ssh'
+unset CVSREAD
+
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# make less more friendly for non-text input files, see lesspipe(1)
+[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
+
+# set variable identifying the chroot you work in (used in the prompt below)
+if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
+ debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# set a fancy prompt (non-color, unless we know we "want" color)
+#case "$TERM" in
+#xterm-color)
+# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+# ;;
+#*)
+# PS1='${debian_chroot:+($debian_chroot)}\u@\h($SHLVL):\w\$ '
+# ;;
+#esac
+
+# Comment in the above and uncomment this below for a color prompt
+PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h($SHLVL)\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+
+# If this is an xterm set the title to user@host:dir
+case "$TERM" in
+xterm*|rxvt*)
+ PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
+ ;;
+*)
+ ;;
+esac
+
+# Alias definitions.
+# You may want to put all your additions into a separate file like
+# ~/.bash_aliases, instead of adding them here directly.
+# See /usr/share/doc/bash-doc/examples in the bash-doc package.
+
+#if [ -f ~/.bash_aliases ]; then
+# . ~/.bash_aliases
+#fi
+
+# enable color support of ls and also add handy aliases
+if [ "$TERM" != "dumb" ]; then
+ eval "`dircolors -b`"
+ alias ls='ls --color=auto'
+ #alias dir='ls --color=auto --format=vertical'
+ #alias vdir='ls --color=auto --format=long'
+fi
+
+# some more ls aliases
+#alias ll='ls -l'
+#alias la='ls -A'
+#alias l='ls -CF'
+
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+fi
--- /dev/null
+:syntax on
+:set nocompatible
+:set backup
+:set showcmd
+" tab stuff
+:set tabstop=4
+:set shiftwidth=4
+:set expandtab
+:set autoindent
+:set shiftround
+:set smarttab
+" search related
+:set hlsearch
+:set incsearch
+" clever autoindenting
+filetype plugin indent on
+" my maps
+:map ,1 :s/^/#/<CR>:nohl<CR><C-g>
+:map ,2 :set paste<Esc>i
+:map ,3 :nohl<CR><C-g>
+:map ,4 :%s/^ //<CR>
+:map ,5 :set filetype=mason<CR><C-g>
+" up and down in split screen
+:map ,k <c-w>k
+:map ,j <c-w>j
--- /dev/null
+cvs.catalyst.net.nz,202.78.240.34 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEApmC1UM46m0BF6FaOio/jkJRMxTLkW/JomVfu4hgK2HV1KPfWaHSyL8Yc0cgKA9pGv0oD/3q9ofhME4U7S3iezVSkFuawBYyoDEZssaXlsIB37UMstSR50pEiZU0+rW4Cc+fcFxhMcwWvBnAFy4VjNCjIqYah2dhTZQadLvJEmeE=
--- /dev/null
+[DB]
+DBName=tab
+Host=pg74
+Port=
+User=tab
+Password=
+DefaultLang=en
+
+[Monitoring]
+dailyCheckDir=/data/tab/dailycheck
+
+[microsites]
+basedir=/data/shared/webdav/microsites
+
+[DSHR]
+mappath=/data/shared/dshr
+logopath=/data/shared/webdav/content/dshr/logos
+presspath=/data/shared/webdav/content/dshr/press
+
+[info]
+newsimgdir=/data/shared/webdav/content/news
+
+[memcached]
+lockhost=localhost
+lockport=11211
+
+[ApacheSession]
+Store=Postgres
+Smepahores=32
+
+[Site]
+Domain=dev.tab.co.nz
+Debug=0
+Staging=1
+Production=0
+DR=0
+BaseDir=/var/www/tab
+
+[TabSite]
+StaticRoot=http://static.dev.tab.co.nz
+EbetRoot=https://ebetdev.tab.co.nz
+StaticDir=/var/www/tab/static
+StripHTML=f
+GZip=f
+
+[Email]
+SMTPHost=localhost
+Webmaster=webmaster@nzracingboard.co.nz
+Admin=admin@tab.wgtn.cat-it.co.nz
+XMLLoader=donovan@catalyst.net.nz
+XMLLoaderError=tab-system@catalyst.net.nz
+XMLLoaderNotify=donovan@catalyst.net.nz
+JEQISendEmail=1
+JEQIError=donovan@catalyst.net.nz
+JEQINotify=donovan@catalyst.net.nz
+TabSystem=tab-system@catalyst.net.nz
+TabDev=tab-system@catalyst.net.nz
+Client=donovan@catalyst.net.nz
+Administration=donovan@catalyst.net.nz
+
+[Admin]
+Domain=tab-admin.wgtn.cat-it.co.nz
+
+[Log]
+BaseDir=/var/log/tab
+
+[LogLevel]
+NZRB.Lock=INFO
+Default=INFO
+heartbeat=DEBUG
+jeqioddsnotification=DEBUG
+webController=DEBUG
+notificationProcessor=DEBUG
+xmlloader=DEBUG
+xmlloader_ng=DEBUG
+jeqinotificationlistener=DEBUG
+controllerTest=DEBUG
+collectZipFiles=DEBUG
+processZipFiles=DEBUG
+jeqi=DEBUG
+tracker=DEBUG
+sendEmailSpool=DEBUG
+sendSMSSpool=DEBUG
+mergeJockeyNonSkeletons=DEBUG
+mergeJockeySkelNonSkel=DEBUG
+mergeJockeySkeletons=DEBUG
+mergeRunnerNonSkeletons=DEBUG
+mergeRunnerSkelNonSkel=DEBUG
+mergeRunnerSkeletons=DEBUG
+clubroomimport=DEBUG
+
+[Lucene]
+Server=localhost
+Port=22222
+
+[JEQI]
+SystemId=Catalyst_Dev
+Server=203.96.82.132
+Port=3004
+PrimaryServer=203.96.82.132
+PrimaryPort=3004
+SecondaryServer=203.96.82.132
+SecondaryPort=3006
+TestServer=203.96.82.132
+TestPort=3002
+AbelardServer=abelard
+AbelardPort=3004
+JeqiAServer=172.16.10.102
+JeqiAPort=2000
+JeqiBServer=172.16.10.103
+JeqiBPort=2000
+AutoServerList=secondary,primary
+
+[JESI]
+Server=210.54.245.180
+Port=2001
+
+[FtpFiles]
+Protocol=Local
+Host=socrates.catalyst.net.nz
+User=tabftp
+Pass=redrumpony
+LocalDir=/data/shared/webdav/xml
+TmpDir=/data/xmlfeeds/tmp
+PendingDir=/data/xmlfeeds/pending
+ProcessedDir=/data/xmlfeeds/processed
+FailedDir=/data/xmlfeeds/failed
+ProcessedFile=/data/xmlfeeds/ProcessedXmlZipFiles
+
+[Clubroom]
+EmailSpoolDir=/data/tab/emailspool
+EmailCreateDir=/data/tab/emailspool/create
+EmailSentDir=/data/tab/emailspool/sent
+EmailFailedDir=/data/tab/emailspool/failed
+SmsSpoolDir=/data/tab/smsspool
+SmsCreateDir=/data/tab/smsspool/create
+SmsSentDir=/data/tab/smsspool/sent
+SmsFailedDir=/data/tab/smsspool/failed
+TextTemplate=/etc/tab/text.tt
+HtmlTemplate=/etc/tab/html.tt
+SmsTemplate=/etc/tab/sms.tt
+ReturnAddress=donovan@catalyst.net.nz
+
+[SMS]
+telecomuser=martyns
+telecompass=tabtest
+telecomshortcode=3822
+telecomhost=210.54.54.161
+vodafoneuser=voda
+vodafonepass=adov
+vodafoneshortcode=98425
+vodafonehost=202.78.240.38:13013
--- /dev/null
+NameVirtualHost *
+
+<VirtualHost *>
+ ServerName __VSNAME__.abelard.wgtn.cat-it.co.nz
+
+ DocumentRoot /home/__PROFILEOPTION_username__/site
+
+ <Directory /home/__PROFILEOPTION_username__/site>
+ Order Allow,Deny
+ Allow from all
+
+ Options Indexes
+ </Directory>
+
+ <FilesMatch "\.html$">
+ SetHandler perl-script
+ PerlHandler HTML::Mason::ApacheHandler
+
+ PerlSetVar MasonCompRoot /home/__PROFILEOPTION_username__/site
+ PerlSetVar MasonDataDir /home/__PROFILEOPTION_username__/.site.mason
+ PerlSetVar MasonErrorMode fatal
+ </FilesMatch>
+
+
+</VirtualHost>
--- /dev/null
+apache-perl
+debconf
+libapache-dbi-perl
+libapache-mod-gzip
+libapache-request-perl
+libapache-session-perl
+libconfig-inifiles-perl
+libgetopt-mixed-perl
+libhtml-mason-perl
+libhtml-mason-perl-doc
+liblog-log4perl-perl
+libmd5-perl
+lsof
+postgresql-client
--- /dev/null
+mkdir -p /home/${PROFILEOPTION_username}/site
+mkdir -p /home/${PROFILEOPTION_username}/.site.mason
+chown -R ${PROFILEOPTION_username}:${PROFILEOPTION_username} /home/${PROFILEOPTION_username}
+chown www-data:www-data /home/${PROFILEOPTION_username}/.site.mason
+
+/usr/sbin/apache-perlctl restart
--- /dev/null
+parent = webserver
--- /dev/null
+site.conf /etc/apache-perl/conf.d/
--- /dev/null
+<VirtualHost *>
+ ServerName __VSNAME__.abelard.wgtn.cat-it.co.nz
+
+ DocumentRoot /home/martyn/htdocs
+
+</VirtualHost>
--- /dev/null
+apache2
+libapache2-mod-php4
--- /dev/null
+rm /etc/apache2/sites-enabled/000-default
+
+ln -s /etc/apache2/sites-available/htdocs-martyn /etc/apache2/sites-enabled/100-htdocs-martyn
+
+echo 'NameVirtualHost *' > /etc/apache2/sites-enabled/000-namevirtualhost
+
+mkdir /home/martyn/htdocs
+echo '<?php phpinfo(); ?>' > /home/martyn/htdocs/index.php
+
+chown -R martyn:martyn /home/martyn/htdocs
+
+apache2ctl graceful
--- /dev/null
+parent = webserver
--- /dev/null
+htdocs-martyn /etc/apache2/sites-available/
--- /dev/null
+<VirtualHost *>
+ ServerName __VSNAME__.abelard.wgtn.cat-it.co.nz
+
+ DocumentRoot /home/martyn/htdocs
+
+</VirtualHost>
--- /dev/null
+apache2
+libapache2-mod-php5
--- /dev/null
+rm /etc/apache2/sites-enabled/000-default
+
+ln -s /etc/apache2/sites-available/htdocs-martyn /etc/apache2/sites-enabled/100-htdocs-martyn
+
+echo 'NameVirtualHost *' > /etc/apache2/sites-enabled/000-namevirtualhost
+
+mkdir /home/martyn/htdocs
+echo '<?php phpinfo(); ?>' > /home/martyn/htdocs/index.php
+
+chown -R martyn:martyn /home/martyn/htdocs
+
+apache2ctl graceful
--- /dev/null
+parent = webserver
--- /dev/null
+htdocs-martyn /etc/apache2/sites-available/
--- /dev/null
+parent = base
+release = sarge
--- /dev/null
+# Add Apache Host Config
+[ -d /etc/apache2/vservers ] || mkdir -p /etc/apache2/vservers
+cat /vserver/.profile/webserver/vservers.template.conf | sed "s/__IPADDR__/${VSIPADDR}/" | sed "s/__NAME__/${VSNAME}/" > /etc/apache2/vservers/${VSNAME}.conf
+apache2ctl graceful
--- /dev/null
+parent = base
--- /dev/null
+# Remove Host Apache Conf
+rm -f /etc/apache2/vservers/${VSNAME}.conf
+apache2ctl graceful
--- /dev/null
+<VirtualHost *:80>
+ ServerAdmin martyn@catalyst.net.nz
+ ServerName __NAME__.abelard.wgtn.cat-it.co.nz
+ ServerAlias *.__NAME__.abelard.wgtn.cat-it.co.nz
+
+ LogLevel warn
+ ErrorLog /var/log/apache2/vserver.__NAME__.error.log
+ CustomLog /var/log/apache2/vserver.__NAME__.access.log combined
+
+ ServerSignature On
+
+ <Proxy>
+ Order allow,deny
+ Allow from all
+ </Proxy>
+
+ ProxyPreserveHost On
+ ProxyPass / http://__IPADDR__/
+ AllowEncodedSlashes On
+</VirtualHost>
+<VirtualHost *:80>
+ ServerName __NAME__.abelard
+ ServerAlias *.__NAME__.abelard
+
+ RewriteEngine On
+
+ RewriteCond %{HTTP_HOST} ^(.*)__NAME__.abelard$
+ RewriteRule ^(.*)$ http://%1__NAME__.abelard.wgtn.cat-it.co.nz$1 [L,R=301]
+</VirtualHost>
--- /dev/null
+parent = base
+release = woody
+mirror = http://debian-archive.catalyst.net.nz/debian