Created
June 8, 2013 18:30
-
-
Save rod-dot-codes/5736140 to your computer and use it in GitHub Desktop.
A basic Nginx Static File server, particular focused for use with Backbone.js install.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen {{ports}}; | |
{% if ssl_secure %} | |
include ssl_secure; | |
{% endif %} | |
server_name {{url}}; | |
client_max_body_size 5G; | |
access_log /var/log/nginx/{{url}}{{ports}}.access; | |
error_log /var/log/nginx/{{url}}{{ports}}.errors; | |
{% for static in static_locations %} | |
location {{static.location}} { | |
alias {{static.file_system_location}}; | |
} | |
{% endfor %} | |
{% if redirect_html_to_index %} | |
location ~* \.html$ { | |
rewrite ^(.+)\.html$ /index.html; | |
} | |
{% endif %} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment