Nginx: drop spdy + log/keepalive tweaks + cleanups
authorGrant Slater <git@firefishy.com>
Wed, 30 Dec 2015 09:49:44 +0000 (09:49 +0000)
committerGrant Slater <git@firefishy.com>
Wed, 30 Dec 2015 09:52:05 +0000 (09:52 +0000)
cookbooks/nginx/templates/default/nginx.conf.erb
cookbooks/tilecache/templates/default/nginx_tile_ssl.conf.erb

index 398ceff..13597d9 100644 (file)
@@ -2,6 +2,7 @@
 
 user  www-data;
 worker_processes <%= node['cpu']['total'] %>;
+worker_rlimit_nofile 65536;
 
 error_log  /var/log/nginx/error.log warn;
 pid        /var/run/nginx.pid;
@@ -11,23 +12,21 @@ events {
     worker_connections  1024;
 }
 
-
 http {
     include       /etc/nginx/mime.types;
     default_type  application/octet-stream;
 
+    server_names_hash_bucket_size 128;
+
     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                       '$status $body_bytes_sent "$http_referer" '
                       '"$http_user_agent" "$http_x_forwarded_for"';
 
-    access_log  /var/log/nginx/access.log  main;
-
-    sendfile        on;
-    #tcp_nopush     on;
+    access_log  /var/log/nginx/access.log  main  buffer=32k flush=1m;
 
     keepalive_timeout  65;
 
-    #gzip  on;
+    server_tokens off;
 
     include /etc/nginx/conf.d/*.conf;
 }
index 63e915f..7f01c3f 100644 (file)
@@ -13,7 +13,7 @@ upstream tile_cache_backend {
 }
 
 server {
-    listen       443 ssl spdy default_server;
+    listen       443 ssl default_server;
     server_name  localhost;
 
     proxy_buffers 8 64k;
@@ -34,5 +34,6 @@ server {
       proxy_pass http://tile_cache_backend;
       proxy_set_header X-Forwarded-For $remote_addr;
       proxy_http_version 1.1;
+      proxy_set_header Connection "";
     }
 }