From 4fee5125c793b983f53a5e307be29d0df5c33a95 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sat, 21 Feb 2015 14:11:09 +0000 Subject: [PATCH] Setup nginx on Heroku --- composer.json | 3 ++- composer.lock | 2 +- nginx.conf | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 nginx.conf diff --git a/composer.json b/composer.json index f0e9de01..bd6645b4 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,8 @@ "index-document": "index.php", "log-files": [ "app/storage/logs/laravel.log" - ] + ], + "nginx-includes": ["nginx.conf"] } }, "scripts": { diff --git a/composer.lock b/composer.lock index 81833788..3efd31be 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "aa66851e963b6a867ebb7bef58c27015", + "hash": "d2ac0b89f83386d9d2ec43cb4e488318", "packages": [ { "name": "cachethq/segment", diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 00000000..2132b3d9 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,11 @@ +location / { + try_files $uri $uri/ /index.php?$query_string; +} + +if (!-d $request_filename) { + rewrite ^/(.+)/$ /$1 permanent; +} + +location ~ /\.ht { + deny all; +} \ No newline at end of file