Created
September 30, 2012 18:22
-
-
Save rubendob/3808058 to your computer and use it in GitHub Desktop.
Nginx
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 2; | |
worker_rlimit_nofile 32768; | |
error_log /var/log/nginx/error.log; | |
#error_log /var/log/nginx/error.log notice; | |
#error_log /var/log/nginx/error.log info; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 4096; | |
multi_accept on; | |
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"'; | |
access_log /var/log/nginx/access.log main; | |
sendfile on; | |
tcp_nopush on; | |
server_tokens off; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_http_version 1.1; | |
gzip_vary on; | |
gzip_comp_level 6; | |
gzip_proxied any; | |
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
gzip_buffers 16 8k; | |
gzip_disable "MSIE [1-6]\.(?!.*SV1)"; | |
# Load config files from the /etc/nginx/conf.d directory | |
# The default server is in conf.d/default.conf | |
include /etc/nginx/conf.d/*.conf; | |
} | |
server{ | |
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$ { | |
expires 30d; | |
access_log off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Versión inicial de nginx