Permalink
Browse files

Adding SPDY, GeoIP, additional headers, some additional file caching.

  • Loading branch information...
darron committed Apr 16, 2014
1 parent ebd5edd commit 49381260b7505aadc5be4ae0fb3120a32bdd0ef3
Showing with 14 additions and 2 deletions.
  1. +9 −1 files/default/proxy.conf
  2. +5 −1 files/default/upstream.conf
View
@@ -18,7 +18,15 @@ http {
variables_hash_max_size 1024;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Add API and Upstream config files.
include /etc/nginx/api.conf;
include /etc/nginx/upstream.conf;
open_file_cache max=100;
# Open File Cache
open_file_cache max=10000 inactive=10m;
open_file_cache_valid 20m;
open_file_cache_min_uses 1;
open_file_cache_errors on;
# GeoIP
geoip_country /usr/local/share/GeoIP/GeoIP.dat;
geoip_city /usr/local/share/GeoIP/GeoLiteCity.dat;
}
@@ -1,7 +1,7 @@
server {
listen 80;
listen 443 ssl deferred;
listen 443 ssl spdy deferred;
ssl_certificate /etc/nginx/ssl.crt;
ssl_certificate_key /etc/nginx/ssl.key;
@@ -25,6 +25,10 @@ server {
# Send some additional headers over.
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Country-Code $geoip_city_country_code;
proxy_set_header X-Country-Code-3 $geoip_city_country_code3;
proxy_set_header X-City $geoip_city;
# Gzip proxied content.
gzip on;
gzip_disable "msie6";

0 comments on commit 4938126

Please sign in to comment.