Skip to content

Instantly share code, notes, and snippets.

@fishman
Created February 13, 2014 16:00
Show Gist options
  • Save fishman/8977793 to your computer and use it in GitHub Desktop.
Save fishman/8977793 to your computer and use it in GitHub Desktop.
user www-data;
worker_processes 2;
worker_rlimit_nofile 262144;
pid /var/run/nginx.pid;
error_log /var/log/nginx/error.log;
events {
worker_connections 16384;
multi_accept on;
use epoll;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
}
user www-data;
worker_processes 2;
worker_rlimit_nofile 200000;
error_log /var/log/nginx/error.log crit;
pid /var/run/nginx.pid;
# use epoll;
events {
worker_connections 2048;
use epoll;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
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 buffer=16k;
sendfile on;
#tcp_nopush on;
# tcp_nopush on;
# tcp_nodelay on;
keepalive_timeout 30;
reset_timedout_connection on;
client_body_timeout 10;
send_timeout 2;
gzip on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
gzip_disable "MSIE [1-6]\.";
include /etc/nginx/conf.d/*.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment