Skip to content

Commit

Permalink
Merge pull request #68 from HarderWork/master
Browse files Browse the repository at this point in the history
Support Nginx on Heroku
  • Loading branch information
josegonzalez committed Jun 5, 2015
2 parents de7faec + 67fad46 commit efca87c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: vendor/bin/heroku-php-apache2 webroot/
web: vendor/bin/heroku-php-nginx -C nginx_app.conf webroot
14 changes: 14 additions & 0 deletions nginx_app.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
location / {
# try to serve file directly, fallback to rewrite
try_files $uri @rewriteapp;
}

location @rewriteapp {
# rewrite all to index.php
rewrite ^(.*)$ /index.php?$uri&$args last;
}

location ~ \.php$ {
try_files @heroku-fcgi @heroku-fcgi;
internal;
}

0 comments on commit efca87c

Please sign in to comment.