Skip to content

Instantly share code, notes, and snippets.

@beamop
Created December 31, 2018 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beamop/fbed84fa8bd30c203f906c941c9a3f0d to your computer and use it in GitHub Desktop.
Save beamop/fbed84fa8bd30c203f906c941c9a3f0d to your computer and use it in GitHub Desktop.
heroku nginx config for symfony
location / {
# try to serve file directly, fallback to rewrite
try_files $uri @rewriteapp;
}
location @rewriteapp {
# rewrite all to app.php
rewrite ^(.*)$ /app.php/$1 last;
}
location ~ ^/(app|app_dev|config)\.php(/|$) {
try_files @heroku-fcgi @heroku-fcgi;
internal;
}
web: vendor/bin/heroku-php-nginx -C nginx_app.conf web/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment