Skip to content

Commit 6657246

Browse files
committed
feat(heroku): add heroku config
1 parent c89663f commit 6657246

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: $(composer config bin-dir)/heroku-php-nginx -C nginx_app.conf web/

nginx_app.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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 index.php
8+
rewrite ^(.*)$ /app.php/$1 last;
9+
}
10+
11+
location ~ ^/app\.php(/|$) {
12+
try_files @heroku-fcgi @heroku-fcgi;
13+
# ensure that /index.php isn't accessible directly, but only through a rewrite
14+
internal;
15+
}

0 commit comments

Comments
 (0)