Skip to content

Instantly share code, notes, and snippets.

@notflip
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notflip/9267587 to your computer and use it in GitHub Desktop.
Save notflip/9267587 to your computer and use it in GitHub Desktop.
Vagrant Basic Apache
mkdir vagrant
cd vagrant
vagrant init lucid32
vim Vagrantfile
#update repositories and dependancy
apt-get update
#install apache2 without prompting
apt-get install -y apache2
#if the www folder already exists on the box, recursive (-r) and force (-f) remove it without prompting
(sudo) rm -rf /var/www
#force (-f) make a symbolic (-s) link to the /vagrant folder in the box
(sudo) ln -fs /vagrant /var/www
# Add this to the Vagrantfile
config.vm.box = "lucid32"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provision :shell, :path => 'provision.sh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment