Heroku is an amazing deployment platform for your apps. nginx is a amazing webserver.
Why not get the best of both worlds?
heroku-buildpack-nginx
works by downloading and compiling nginx (plus
dependencies) whenever you deploy.
Check out this demo to see how it works,and look at the (incredibly simple) source here.
First, configure your app to use heroku-buildpack-nginx
as its buildpack:
- For new apps:
heroku create --buildpack git://github.com/neersighted/heroku-buildpack-nginx
- For existing apps:
heroku config:add BUILDPACK_URL=git://github.com/neersighted/heroku-buildpack-nginx
All HTML files go in the root of your project (lay out any folders how you like).
heroku-buildpack-nginx
will be used if a index.html
, index.html
,
index.xhtml
, or index.php
is found in the root of your project.
If you want to get real fancy, you can alter some config files:
To use them, simply copy either (or both) of these files into your project,
in the config/
directory. You can then edit them (they are very
self-explanatory), and they will automagicly be used on the next build.
Fork this repo, and submit a pull request.