user nginx;
worker_processes  4;

error_log   /var/log/nginx/error.log;
error_log  syslog:server=unix:/dev/log,facility=local6,tag=nginx,severity=warn;
pid        /var/run/nginx.pid;

events {
    worker_connections  4096;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    client_max_body_size 1000M;
    log_format  main  '$remote_addr $remote_user [$time_local] '
		      '"$request_method $http_x_forwarded_proto://$http_host$request_uri $status" '
                      '"$http_user_agent"  $request_time';
    log_format  syslog  '$remote_addr $remote_user  '
		      '"$request_method $http_x_forwarded_proto://$http_host$request_uri $status" '
                      '"$http_user_agent"  $request_time';
    access_log	/var/log/nginx/access.log main;
    access_log  syslog:server=unix:/dev/log,facility=local6,tag=nginx,severity=warn syslog;

    server_names_hash_max_size 5120;
    server_names_hash_bucket_size 1024;

    resolver 10.0.0.2;

    server_tokens off;

    underscores_in_headers on;
    sendfile        on;

    proxy_http_version 1.1;
    keepalive_timeout  30;
    tcp_nodelay        on;
#    chunkin	       on;
    chunked_transfer_encoding on;
    large_client_header_buffers 4 16k;
    proxy_buffer_size   128k;
    proxy_buffers   4 256k;
    proxy_busy_buffers_size   256k;

    set_real_ip_from 10.0.0.0/16;
    real_ip_header X-Forwarded-For;
    real_ip_recursive on;

    limit_req_zone  $binary_remote_addr zone=basic:16m rate=15r/s;

    include /etc/nginx/sites-enabled/*;
}
