Laravel nginx.conf with official Heroku php buildpack? Laravel nginx.conf with official Heroku php buildpack? nginx nginx

Laravel nginx.conf with official Heroku php buildpack?


This ended up working for me:Procfile:

web: vendor/bin/heroku-php-nginx -C nginx.conf public/

nginx.conf

location / {    # try to serve file directly, fallback to rewrite    try_files $uri @rewriteapp;}location @rewriteapp {    # rewrite all to app.php    rewrite ^(.*)$ /index.php$1 last;}


You are missing fastcgi_* directives; try this after your location directive:

location ~ \.php$ {    try_files $uri /index.php =404;    fastcgi_split_path_info ^(.+\.php)(/.+)$;    fastcgi_pass unix:/var/run/php5-fpm.sock;    fastcgi_index index.php;    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;    include fastcgi_params;}

Source: How to Install Laravel with an Nginx Web Server on Ubuntu 14.04