Skip to content

Instantly share code, notes, and snippets.

@travm
Last active February 19, 2016 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save travm/2ef5ad0a6c679855df69 to your computer and use it in GitHub Desktop.
Save travm/2ef5ad0a6c679855df69 to your computer and use it in GitHub Desktop.
Vagrantfile for Kirby (http://getkirby.com)
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Box
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
# Forwarded Ports
config.vm.network :forwarded_port, guest: 80, host: 8888
# Shared Folders
config.vm.synced_folder "./", "/vagrant",
owner: "vagrant",
group: "www-data",
mount_options: ["dmode=775,fmode=664"]
# Provisioning
config.vm.provision :shell, :inline => "apt-get update --fix-missing"
config.vm.provision :shell, :inline => "apt-get install -q -y python-software-properties python"
config.vm.provision :shell, :inline => "add-apt-repository ppa:ondrej/php5 && apt-get update"
config.vm.provision :shell, :inline => "apt-get install -q -y figlet g++ make git curl apache2 libapache2-mod-php5 php5-curl php5-cli php5-gd"
config.vm.provision :shell, :inline => "sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf"
config.vm.provision :shell, :inline => "sudo a2enmod rewrite"
config.vm.provision :shell, :inline => "sudo a2enmod expires"
config.vm.provision :shell, :inline => "service apache2 restart"
# Change Apache Working Directory
config.vm.provision :shell, :inline => "rm -rf /var/www/html"
config.vm.provision :shell, :inline => "ln -fs /vagrant /var/www/html"
# Done
config.vm.provision :shell, :inline => "figlet READY"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment