36
loading...
This website collects cookies to deliver better user experience
init
to create a project in the existing directory.config.vm.box = “base”
config.vm.box_url = “http://www”
config.vm.network :forwarded_port, guest: 80, host:8080
vagrant init hashicorp/precise64
vagrant up // to start the virtual machine
vagrant SSH
vagrant destroy
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get -y upgrade
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install python-software-properties
-y
will ok all yes/no prompts during the installation.sudo apt-get install -y wget apavhe2 php php-curl
/var/www
.sudo a2enmod rewrite
rm -rf /var/www
ln -fs /vagrant /var/www
sudo service apache2 restart
config.vm.box_provision :shell, :path=> "bash_file_name.sh"
vagrant provision
http://localhost:8080/filename.php