Skip to content

Instantly share code, notes, and snippets.

@rubendob
Created September 30, 2012 18:22
Show Gist options
  • Save rubendob/3808058 to your computer and use it in GitHub Desktop.
Save rubendob/3808058 to your computer and use it in GitHub Desktop.
Nginx
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;
}
}
@rubendob
Copy link
Author

Versión inicial de nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment