Skip to content

Commit 7ec2dc7

Browse files
committed
Vagrant: Adding vagrant file and provision script
1 parent cb4a416 commit 7ec2dc7

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ config.php
22
cron/reports
33
log
44
.idea
5+
.vagrant

Vagrantfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.configure("2") do |config|
5+
config.vm.box = "debian-7.2.0-amd64"
6+
7+
config.vm.network :forwarded_port, guest: 80, host: 8080
8+
9+
config.vm.synced_folder ".", "/var/www"
10+
11+
# config.vm.provider :virtualbox do |vb|
12+
# # Don't boot with headless mode
13+
# vb.gui = true
14+
#
15+
# # Use VBoxManage to customize the VM. For example to change memory:
16+
# vb.customize ["modifyvm", :id, "--memory", "1024"]
17+
# end
18+
config.vm.provision "shell", path: "setup/host"
19+
end

setup/host

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# we want to bail on any and all errors
4+
set -e
5+
sudo apt-get update || true # except this one
6+
# Check to make sure we have apache and the php module
7+
dpkg -l | grep -q libapache2-mod-php5 || sudo apt-get -y install libapache2-mod-php5
8+
9+
# enable mod_rewrite
10+
sudo a2enmod rewrite
11+
12+
# Allow mod_rewrite to actually work
13+
# this is an ugly hack, but it works on the dev box
14+
sudo sed -i -e '/AllowOverride None/d' /etc/apache2/sites-enabled/000-default
15+
16+
# restart apache
17+
sudo service apache2 restart

0 commit comments

Comments
 (0)