Skip to content

Instantly share code, notes, and snippets.

@joehinkle
Created November 4, 2014 16:29
Show Gist options
  • Save joehinkle/26ecfa4864893f765711 to your computer and use it in GitHub Desktop.
Save joehinkle/26ecfa4864893f765711 to your computer and use it in GitHub Desktop.
Vagrant Box for PHP5 usage
#!/usr/bin/env bash
apt-get update -y
apt-get install -y apache2
apt-get install -y php5 libapache2-mod-php5 php5-cli
cat <<CONFIG > /etc/apache2/sites-enabled/000-default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /vagrant
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /vagrant>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
CONFIG
service apache2 restart
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.network "forwarded_port", guest: 80, host: 8080
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment