Created
September 15, 2014 15:18
-
-
Save jessereynolds/4a511e0c4a00dff22c94 to your computer and use it in GitHub Desktop.
flapjack nginx config template
This file contains hidden or 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 <%= server_name %>:80; | |
server_name <%= server_name %>; | |
access_log /var/log/nginx/<%= short_name %>-access.log; | |
error_log /var/log/nginx/<%= short_name %>-error.log; | |
server_name_in_redirect off; | |
server_tokens off; | |
# Normalise Accept-Encoding header for later reuse. | |
if ($http_accept_encoding ~ gzip){ | |
set $encoding "gzip"; | |
break; | |
} | |
if ($http_accept_encoding ~ deflate){ | |
set $encoding "deflate"; | |
break; | |
} | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_read_timeout <%= proxy_read_timeout %>; | |
#error_page 500 502 503 504 /500.html; | |
proxy_pass http://<%= application_servers %>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment