Created
December 12, 2015 03:38
-
-
Save Telmo/9a1fa17cbf7f220ffac8 to your computer and use it in GitHub Desktop.
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
worker_processes auto; | |
events { | |
worker_connections 100000; | |
multi_accept on; | |
use epoll; | |
} | |
worker_rlimit_nofile 100000; | |
# echo 20000 > /writable-proc/sys/net/core/somaxconn | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
server_names_hash_bucket_size 128; | |
tcp_nopush on; | |
tcp_nodelay on; | |
# allow the server to close the connection after a client stops responding. Frees up socket-associated memory. | |
reset_timedout_connection on; | |
# Number of requests a client can make over the keep-alive connection. This is set high for testing. | |
keepalive_requests 120000; | |
lua_package_path '/usr/local/nginx/uuid4.lua'; | |
init_by_lua ' | |
uuid4 = require "uuid4" | |
'; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
log_format logstash '[$time_local] ' | |
'$uuid ' | |
'$remote_addr ' | |
'$request_method ' | |
'$request_uri ' | |
'$status ' | |
'$request_time ' | |
'$body_bytes_sent ' | |
'$http_host ' | |
'"$http_referer" ' | |
'"$http_user_agent" ' | |
'"$http_x_forwarded_for" ' | |
'$upstream_response_time'; | |
# access_log /var/log/nginx/nginx-access.log off; | |
# access_log off; | |
error_log /var/log/nginx/nginx-error.log error; | |
# Use a DNS resolver as part of the DNS caching hack (only required for free version) | |
# | |
# No need to use these, DHCP Option Sets should be properly configured per VPC | |
# DNSMasq will automatically recursively use these if there is no local match | |
resolver dnsmasq:5353; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json; | |
server { | |
listen 80 default_server backlog=100000; | |
root /usr/local/nginx/html; | |
location /health { | |
access_log off; | |
return 200 "health ok"; | |
} | |
} | |
include /usr/local/nginx/conf/conf.d/server-bar.conf; | |
include /usr/local/nginx/conf/conf.d/server-generic.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment