azavea/nyc-trees — pull request #80 by hectcastro (2014-11-13 23:28:02+00:00)
Title: Adjust static asset handling by Nginx to accommodate Django

This changeset alters the way static assets are served by Nginx. Static assets emitted by Django and prefixed with `/static/` are handled by a specific `location` block that creates an alias to `{{ app_home }}/collected_static`.

For other static assets prefixed by `js` or `img` or `css` or `font` (taken from the `.gitignore` file inside `src/nyc_trees/static`), Nginx looks for a match within the web root and returns a 404 if it is not found. This prevents Nginx from passing static file misses through to Gunicorn.

Attempts to resolve #78.