Skip to content

Instantly share code, notes, and snippets.

@rodolfofadino
Created May 31, 2014 14:36
Show Gist options
  • Save rodolfofadino/642380e3eebccf6d27c4 to your computer and use it in GitHub Desktop.
Save rodolfofadino/642380e3eebccf6d27c4 to your computer and use it in GitHub Desktop.
nginx.conf
worker_processes 5;
worker_rlimit_nofile 300000;
pid /var/run/nginx.pid;
events {
worker_connections 10540;
# multi_accept on;
}
http {
proxy_cache_path /data/nginx/cachepath levels=1:2 keys_zone=STATIC:50m
inactive=12h max_size=5g;
## Proxy caching options
# proxy_buffering on;
proxy_cache_min_uses 1;
proxy_ignore_client_abort off;
proxy_intercept_errors on;
proxy_next_upstream error timeout invalid_header;
proxy_redirect off;
# proxy_set_header X-Forwarded-For $remote_addr;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
# error_log /dev/null crit;
error_log /etc/nginx/log/error.log;
gzip on;
gzip_disable "msie6";
##
# Virtual Host Configs
##
# Size Limits
client_body_buffer_size 128K;
client_header_buffer_size 2M;
client_max_body_size 2M;
large_client_header_buffers 8 8k;
## Timeouts
client_body_timeout 60;
client_header_timeout 60;
expires 24h;
keepalive_timeout 60 60;
send_timeout 60;
## General Options
ignore_invalid_headers on;
keepalive_requests 100;
limit_zone gulag $binary_remote_addr 5m;
recursive_error_pages on;
sendfile on;
server_name_in_redirect off;
server_tokens off;
## TCP options
tcp_nodelay on;
tcp_nopush on;
# include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment