Skip to content

Instantly share code, notes, and snippets.

@kemadz
Created September 1, 2012 11:41
Show Gist options
  • Save kemadz/3570714 to your computer and use it in GitHub Desktop.
Save kemadz/3570714 to your computer and use it in GitHub Desktop.
Nginx Configuration
#user http http;
worker_processes 1;
worker_rlimit_nofile 64000;
error_log /var/log/nginx/error.log info;
events {
worker_connections 16000;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
connection_pool_size 256;
client_header_buffer_size 1k;
large_client_header_buffers 4 2k;
request_pool_size 4k;
output_buffers 1 32k;
postpone_output 1460;
# Don't follow symlink if the symlink's owner is not the target owner.
# Enabled for the security reason.
disable_symlinks if_not_owner;
server_tokens off;
ignore_invalid_headers on;
client_header_timeout 5;
client_body_timeout 15;
send_timeout 10;
keepalive_timeout 20 15;
gzip on;
gzip_vary on;
gzip_comp_level 9;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types text/plain text/css image/bmp;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
index index.html;
include /etc/nginx/sites/*;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment