Created
July 5, 2011 20:50
-
-
Save RobertBrewitz/1065889 to your computer and use it in GitHub Desktop.
Nginx baseline configuration for Amazon EC2 instance after tuning session
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
user www-data www-data; | |
pid /var/run/nginx.pid; | |
worker_rlimit_nofile 58064; | |
worker_processes 1; | |
events { | |
use epoll; | |
worker_connections 58064; | |
} | |
http { | |
server_tokens off; | |
default_type text/html; | |
include /usr/local/nginx/conf/mime.types; | |
open_file_cache max=4096 inactive=20s; | |
open_file_cache_valid 30s; | |
open_file_cache_min_uses 2; | |
open_file_cache_errors off; | |
variables_hash_bucket_size 128; | |
variables_hash_max_size 1024; | |
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
great!