Created
March 13, 2014 04:15
-
-
Save hayajo/9521808 to your computer and use it in GitHub Desktop.
VagrantShareでカレントディレクトリのファイルを公開する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WinでもMacでもLinuxでもできるので地味に便利だ