Skip to content

Instantly share code, notes, and snippets.

@RobertBrewitz
Created July 4, 2011 22:09
Show Gist options
  • Save RobertBrewitz/1064004 to your computer and use it in GitHub Desktop.
Save RobertBrewitz/1064004 to your computer and use it in GitHub Desktop.
Baseline configuration
user www-data www-data;
pid /var/run/nginx.pid;
worker_processes 1;
events {
worker_connections 1024;
}
http {
server_tokens off;
default_type text/html;
include /usr/local/nginx/conf/mime.types;
log_format gzip '[$status @ $time_local] "$request" "$gzip_ratio" $bytes_sent "$http_referer" "$http_user_agent"';
access_log /var/log/nginx/access.log gzip buffer=32k;
error_log /var/log/nginx/error.log crit buffer=32k;
gzip on;
gzip_vary on;
gzip_static on;
gzip_comp_level 1;
gzip_min_length 0;
gzip_http_version 1.1;
gzip_proxied any;
gzip_disable "MSIE [1-6].(?!.*SV1)";
gzip_buffers 16 8k;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript image/bmp;
include /usr/local/nginx/sites-enabled/*;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment