Skip to content

Instantly share code, notes, and snippets.

@ryanorsinger
Created June 2, 2015 19:49
Show Gist options
  • Save ryanorsinger/3607475a1a0925a67b98 to your computer and use it in GitHub Desktop.
Save ryanorsinger/3607475a1a0925a67b98 to your computer and use it in GitHub Desktop.
Setting up a new Laravel installation and new ansible site
Step 1.
`vagrant ssh` to ssh into your Vagrant VM.
from `/vagrant/sites/` run `composer create-project laravel/laravel {directory} 4.2 --prefer-dist`
name `{directory}` project.dev or mynewsite.dev.
Step 2.
from your `~/vagrant-lamp/` directory on your Mac, run `ansible-playbook ansible/create-vagrant-site.yml`
name the new site exactly as you've named project.dev or mynewsite.dev
Step 3.
from your Mac, do `subl /etc/hosts`
add an entry for project.dev to point to the IP address of your Vagrant VM. It should match the IP of other projects
Step 4.
from `~/vagrant/sites/project.dev` on your Vagrant VM, run `composer install`
Navigate to http://project.dev and you should see the Laravel "You have arrived!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment