Skip to content

Instantly share code, notes, and snippets.

@rabidgremlin
Last active August 29, 2015 13:57
Show Gist options
  • Save rabidgremlin/9791791 to your computer and use it in GitHub Desktop.
Save rabidgremlin/9791791 to your computer and use it in GitHub Desktop.
Vagrant demo scripts
Files for Vagrant demo
<VirtualHost *:80>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
DocumentRoot /vagrant/www/
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
#!/bin/sh
# update apt
apt-get update
# install apache and php
apt-get -y install apache2 php5 libapache2-mod-php5
# set up apache to point at /vagrant/www
cp /vagrant/apache.conf /etc/apache2/sites-enabled/000-default
service apache2 restart
echo "Done !"
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "512"]
end
config.vm.provision "shell", path: "bootstrap.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment