change ROOT env var and doc it

This commit is contained in:
Michael Hobbs 2015-11-25 10:43:01 -08:00
parent 61c95d52d8
commit ccbb3d7ed5
2 changed files with 4 additions and 4 deletions

View File

@ -9,10 +9,10 @@ This buildpack has been successfully run on Digital Ocean instances of Ubuntu 14
2. Add another, *empty* file called `.static` to your root directory of your web project. It signals that this buildpack shall be used
3. Push your project to Dokku
All static files that you want to serve should be in the root directory of your repository. No need to use a seperate `www` folder. `buildpack-nginx` will automatically download the buildpack, download NGINX, compile it, and install it. The next time you push your project, the buildpack will reuse the precompiled binaries.
All static files that you want to serve should be in the root directory of your repository. No need to use a seperate `www` folder. `buildpack-nginx` will automatically download the buildpack, download NGINX, compile it, and install it. The next time you push your project, the buildpack will reuse the precompiled binaries.
## NGINX CONFIGURATION
Override default configuration by adding `nginx.conf.erb` in the root directory
Override default configuration by adding `nginx.conf.erb` in the root directory. You can also override the nginx root by setting `$NGINX_ROOT`
## Credits and License
`buildpack-nginx` is licensed under the CC0 1.0 Universal license and has been informed by many similar projects on the web

View File

@ -13,8 +13,8 @@ http {
server {
listen <%= ENV["PORT"] %>;
server_name _;
<% if ENV["ROOT"] %>
root /app/www/<%= ENV["ROOT"] %>;
<% if ENV["NGINX_ROOT"] %>
root /app/www/<%= ENV["NGINX_ROOT"] %>;
<% else %>
root /app/www;
<% end %>