Heroku fix

This commit is contained in:
Pablo Ferreiro 2022-03-13 18:42:41 +01:00
parent 3b5c3cd96c
commit d061c210a2
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
2 changed files with 16 additions and 1 deletions

View file

@ -1 +1 @@
web: vendor/bin/heroku-php-nginx -C ./setup/nginx.conf web: vendor/bin/heroku-php-nginx -C setup/nginx_heroku.conf

15
setup/nginx_heroku.conf Normal file
View file

@ -0,0 +1,15 @@
location / {
# try to serve file directly, fallback to rewrite
try_files $uri @rewriteapp;
}
location @rewriteapp {
# rewrite all to index.php
rewrite ^(.*)$ /index.php/$1 last;
}
location ~ ^/index\.php(/|$) {
try_files @heroku-fcgi @heroku-fcgi;
# ensure that /index.php isn't accessible directly, but only through a rewrite
internal;
}