Skip to content

Instantly share code, notes, and snippets.

@ricardokrieg
Created January 24, 2012 17:49
Show Gist options
  • Save ricardokrieg/1671490 to your computer and use it in GitHub Desktop.
Save ricardokrieg/1671490 to your computer and use it in GitHub Desktop.
Nginx configuration file
user www-data;
worker_processes 4;
worker_rlimit_nofile 2048;
worker_priority 0;
worker_cpu_affinity 0001 0010 0100 1000;
error_log /var/log/nginx/error.log;
events {
multi_accept off;
worker_connections 2048;
}
http {
include mime.types;
include /usr/local/nginx/sites-enabled/*;
default_type application/octet-stream;
log_format timed_combined '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'$request_time $upstream_response_time $pipe';
access_log /var/log/nginx/access.log timed_combined;
sendfile on;
keepalive_timeout 65;
client_max_body_size 20M;
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment