Skip to content

Instantly share code, notes, and snippets.

@LasaleFamine
Last active September 9, 2016 20:25
Show Gist options
  • Select an option

  • Save LasaleFamine/4cad11817280e83454114cffc38f57b7 to your computer and use it in GitHub Desktop.

Select an option

Save LasaleFamine/4cad11817280e83454114cffc38f57b7 to your computer and use it in GitHub Desktop.
Simple Procfile to run static websites (with setted Root directory) on Heroku with no problems! 🚀

How to run a static website as a fake PHP on Heroku

Apache2

web: vendor/bin/heroku-php-apache2 your/public/root

Nginx

web: vendor/bin/heroku-php-nginx your/public/root

Simply omitt your/public/root to point to the root of your repository.

Using HHVM

You can also try HHVM runtime. Just change php with hhvm and that's all.

! NOTE (from Heroku documentation)

If you specify additional options to the script (as described in the sections that follow), you must ensure that the document root argument is at the end of the command, after all options.

For example:

web: vendor/bin/heroku-php-nginx -C rewrite.conf www/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment