Created
March 10, 2016 19:30
-
-
Save jeffersonsouza/b3c5712bcf3b5290b8a6 to your computer and use it in GitHub Desktop.
NGINX Conf for high performance
This file contains hidden or 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 nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
access_log /var/log/nginx/access.log main; | |
client_header_timeout 3m; | |
client_body_timeout 3m; | |
send_timeout 3m; | |
keepalive_timeout 15; | |
keepalive_requests 100000; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
client_body_buffer_size 10K; | |
client_header_buffer_size 1k; | |
client_max_body_size 10m; | |
large_client_header_buffers 2 1k; | |
gzip on; | |
gzip_comp_level 2; | |
gzip_min_length 1000; | |
gzip_proxied expired no-cache no-store private auth; | |
gzip_types text/plain application/x-javascript text/xml text/css application/xml; | |
gzip_disable "MSIE [1-6]\."; | |
open_file_cache max=1000 inactive=20s; | |
open_file_cache_valid 30s; | |
open_file_cache_min_uses 5; | |
open_file_cache_errors off; | |
include /etc/nginx/conf.d/*.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment