Skip to content

Commit 6610b28

Browse files
author
Jovert Lota Palonpon
committed
Attempt to fix nginx configuration for heroku
1 parent bde9b1b commit 6610b28

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sqs: php artisan queue:work --timeout=1800
2-
web: vendor/bin/heroku-php-nginx public/
2+
web: vendor/bin/heroku-php-nginx -C nginx_app.conf /public

nginx_app.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
location / {
2+
# try to serve file directly, fallback to rewrite
3+
try_files $uri @rewriteapp;
4+
}
5+
6+
location @rewriteapp {
7+
# rewrite all to app.php
8+
rewrite ^(.*)$ /index.php/$1 last;
9+
}
10+
11+
location ~ ^/(app|app_dev|config)\.php(/|$) {
12+
try_files @heroku-fcgi @heroku-fcgi;
13+
internal;
14+
}

public/nginx_app.conf

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)