Skip to content

Instantly share code, notes, and snippets.

@marcdomain
Last active February 26, 2019 13:20
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 marcdomain/931da97339d161184902f30cffd00cc7 to your computer and use it in GitHub Desktop.
Save marcdomain/931da97339d161184902f30cffd00cc7 to your computer and use it in GitHub Desktop.
Vagrant File for creating Apache Server
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Install ubuntu/trusty64 in the VM Box
config.vm.box = "ubuntu/trusty64"
# Use virtualbox provider
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = "2048"
vb.cpus = 3
end
# Create a private IP address
config.vm.network "private_network", ip: "10.44.44.10"
# Synce a directory on Local Machine to a path on the VM
config.vm.synced_folder ".", "/var/www/html"
# Create provision script to automate installation of dependencies
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y apache2
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment