user  apache apache;

worker_processes  1;

error_log /var/log/nginx/error_log info;

events {
	worker_connections  1000;
	use epoll;
}

http {
	include		/etc/nginx/mime.types;
	default_type	application/octet-stream;

	log_format main
		'$remote_addr - $remote_user [$time_local] '
        	'"$request" $status $bytes_sent '
		'"$http_referer" "$http_user_agent" '
		'"$gzip_ratio" "$request_time"';
									       
	client_header_timeout	1m;
	client_body_timeout	1m;
	send_timeout		1m;

	connection_pool_size		256;
	client_header_buffer_size	1k;
	large_client_header_buffers	4 2k;
	request_pool_size		4k;

	gzip on;
	gzip_min_length	1100;
	gzip_buffers	4 8k;
	gzip_types	text/plain;

	output_buffers	2 256k;
	postpone_output	1460;

	sendfile	on;
	tcp_nopush	on;
	tcp_nodelay	on;

	keepalive_timeout	75 20;

	ignore_invalid_headers	on;

	index index.html index.php;
        client_max_body_size       10m;
	client_body_buffer_size    128k;

        proxy_connect_timeout      90;
        proxy_send_timeout         90;
        proxy_read_timeout         90;

        proxy_buffers 64 4k;
	proxy_set_header   X-Real-IP		$remote_addr;
        proxy_set_header   Host			$host;
	proxy_pass_header   X-Forwarded-For;
	limit_zone   one  $binary_remote_addr  1m;

	server{
	    set $defdocroot /var/www/localhost/htdocs;
    	    listen      81 default;
            server_name 192.168.78.1;
    	    access_log  /var/log/nginx/nest.access.log  main;
    	    error_log  /var/log/nginx/nest.error.log  warn;
	    error_log /var/log/nginx/nest.debug.log debug;
    	    location / {

                index  index.html index.htm index.php index.shtml;
		#access_log  /var/log/nginx/tmp.access.log  main;
		#sendfile off;
		#limit_rate          16384;
                root $defdocroot;
    	    }

            location = /nginx_status {
                    stub_status on;
                    access_log   off;
            }
    	    error_page   500 502 503 504  /50x.html;
    	    location = /50x.html {
        	root   html;
    	    }

    	    location ~ /\.ht {
        	deny  all;
    	    }
	}
}
