#!/bin/bash

# -----------------------------------------------------------------------------
#
# Setup Apache 2.2
#
# -----------------------------------------------------------------------------

# Load the functions needed to our shell provider
source ${provision_path}/functions.sh

# Install apache
install_packages apache2

# Install our Apache Configuration file
copy_file ${provision_path}/files/httpd/envvars /etc/apache2/envvars

# Install our vhost file
copy_file ${provision_path}/files/httpd/vhost.conf /etc/apache2/sites-available/000-default.conf

# Enable rewrite module
a2enmod rewrite

# Enable headers module
a2enmod headers

# Make sure that Apache is running with the latest config files
service apache2 restart
