Last active
August 29, 2015 13:56
-
-
Save notflip/9267587 to your computer and use it in GitHub Desktop.
Vagrant Basic Apache
This file contains 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
mkdir vagrant | |
cd vagrant | |
vagrant init lucid32 | |
vim Vagrantfile |
This file contains 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
#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 |
This file contains 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
# 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