Automatically configure Apache

Paul Wagener 11 years ago
parent b19f901960
commit 9828a079e0
  1. 11
      build-vm/boot.sh
  2. 12
      build-vm/security-workshop.apache.conf

@ -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

@ -0,0 +1,12 @@
<VirtualHost *:80>
DocumentRoot /home/security/workshop
<Directory "/home/security/workshop">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Loading…
Cancel
Save