From 9828a079e0ee5ba8a813c1b1256640d36ddb9c52 Mon Sep 17 00:00:00 2001 From: Paul Wagener Date: Fri, 3 Jan 2014 14:36:29 +0000 Subject: [PATCH] Automatically configure Apache --- build-vm/boot.sh | 11 +++++++++++ build-vm/security-workshop.apache.conf | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 build-vm/security-workshop.apache.conf diff --git a/build-vm/boot.sh b/build-vm/boot.sh index 77b2f30..807d762 100755 --- a/build-vm/boot.sh +++ b/build-vm/boot.sh @@ -1,8 +1,19 @@ #!/bin/sh +# This script runs each time the VM starts up + echo cd /home/security/workshop + +# Update repository git pull origin master +# Update Apache configuration +cp build-vm/security-workshop.apache.conf /etc/apache2/sites-available/security-workshop.conf +a2dissite 000-default +a2ensite security-workshop +service apache2 reload + +# Show welcome message IP=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print \$1}'` echo diff --git a/build-vm/security-workshop.apache.conf b/build-vm/security-workshop.apache.conf new file mode 100644 index 0000000..608fb1c --- /dev/null +++ b/build-vm/security-workshop.apache.conf @@ -0,0 +1,12 @@ + + + DocumentRoot /home/security/workshop + + + Options All + AllowOverride All + Require all granted + + + +