Last active
December 30, 2015 15:59
-
-
Save vitormil/7851961 to your computer and use it in GitHub Desktop.
/etc/nginx/nginx.conf
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; | |
worker_processes 1; # 1 per core | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} | |
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"'; | |
server_tokens off; # hide nginx version number in error pages and server header | |
sendfile on; | |
keepalive_requests 10; | |
keepalive_timeout 30; | |
tcp_nopush on; | |
tcp_nodelay off; | |
client_header_timeout 60; | |
client_body_timeout 60; | |
send_timeout 60; | |
ignore_invalid_headers on; | |
server_name_in_redirect off; | |
large_client_header_buffers 2 2k; | |
server_names_hash_max_size 4096; | |
gzip on; | |
gzip_http_version 1.0; | |
gzip_comp_level 6; | |
gzip_buffers 16 8k; | |
gzip_proxied any; | |
gzip_vary off; | |
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json; | |
gzip_min_length 500; | |
gzip_disable "MSIE [1-6]\."; | |
server_names_hash_bucket_size 64; | |
types_hash_max_size 2048; | |
types_hash_bucket_size 64; | |
include /etc/nginx/conf.d/*.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment