Create a gist now

Instantly share code, notes, and snippets.

@koseki /README.md
Last active Aug 29, 2015

What would you like to do?
vagrant-layout: Laravel

Vagrant Layout - Laravel

This is configuration of vagrant-layout plugin. Based on php layout.

Installation

$ vagrant plugin install vagrant-layout
$ mkdir my-project && cd my-project
$ vagrant layout init https://gist.github.com/koseki/efbd631472c932ff2153

Double click sandbox/osx/manage/start.command or start.bat. Wait a while, and access http://localhost:8080/.

Feel free to fork and create your own layout.


base: https://github.com/koseki/vagrant-layout/commit/f62c58ebb20cd2b6cf9823c64856531f707bd18f

diff --git a/sandbox/bin/boot.sh b/sandbox/bin/boot.sh
index 4c475b2..1bc8035 100644
--- a/sandbox/bin/boot.sh
+++ b/sandbox/bin/boot.sh
@@ -3,6 +3,10 @@
set -e
cd `dirname $0`/..
+if [ ! -d "../sample-app" ]; then
+ composer create-project laravel/laravel ../sample-app --prefer-dist
+fi
+
touch logs/error.log
./bin/shoreman
diff --git a/sandbox/config/nginx.conf.src b/sandbox/config/nginx.conf.src
index 32695c3..ef5d258 100644
--- a/sandbox/config/nginx.conf.src
+++ b/sandbox/config/nginx.conf.src
@@ -32,7 +32,7 @@ http {
index index.html index.htm index.php;
location / {
- root PROJECT_ROOT/static/htdocs;
+ root PROJECT_ROOT/sample-app/public;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment