Skip to content

Instantly share code, notes, and snippets.

@hayajo
Created March 13, 2014 04:15

Revisions

  1. hayajo created this gist Mar 13, 2014.
    23 changes: 23 additions & 0 deletions Vagrantfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # -*- mode: ruby -*-
    # vi: set ft=ruby :

    # Usage:
    # $ vagrant up
    # $ vagrant login
    # $ vagrant share
    #
    # access to http://<shared_name>.vagrantshare.com

    Vagrant.configure(2) do |config|
    config.vm.box = "precise64"
    config.vm.box_url = "http://files.vagrantup.com/precise64.box"

    config.vm.network :forwarded_port, guest: 80, host: 8080

    config.vm.provision "shell", inline: <<-EOS
    apt-get update
    apt-get install -y apache2
    rm -rf /var/www
    ln -fs /vagrant /var/www
    EOS
    end