Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Adding SPDY, GeoIP, additional headers, some additional file caching.
Browse files Browse the repository at this point in the history
  • Loading branch information
darron committed Apr 16, 2014
1 parent ebd5edd commit 4938126
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion files/default/proxy.conf
Expand Up @@ -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;
}
6 changes: 5 additions & 1 deletion files/default/upstream.conf
@@ -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;

Expand All @@ -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";
Expand Down

0 comments on commit 4938126

Please sign in to comment.