
worker_processes  1;




events {
    worker_connections  1024;
}


http {

    	server_tokens		off;
	sendfile		on;
	tcp_nopush		on;
	tcp_nodelay		on;
	ssi			off;

	#Timeouts
        client_body_timeout	5;
        client_header_timeout	5;
        keepalive_timeout	25 25;
        send_timeout		15s;
	resolver_timeout	3s;

	#Directive sets timeout period for connection with FastCGI-server. It should be noted that this value can't exceed 75 seconds. 
	fastcgi_connect_timeout 5s;

	#Directive sets the amount of time for upstream to wait for a fastcgi process to send data. Change this directive if you have long running fastcgi processes that do not produce output until they have finished processing. If you are seeing an upstream timed out error in the error log, then increase this parameter to something more appropriate. 
	fastcgi_read_timeout	40s;

	#Directive specifies request timeout to the server. The timeout is calculated between two write operations, not for the whole request. If no data have been written during this period then serve closes the connection.
	fastcgi_send_timeout	15s;


	fastcgi_buffers 8 32k;
	fastcgi_buffer_size 32k;
	#fastcgi_busy_buffers_size 256k;
	#fastcgi_temp_file_write_size 256k;

	open_file_cache off;


	#php max upload limit cannot be larger than this       
	client_max_body_size 8m;
        ####client_body_buffer_size  1K;
        client_header_buffer_size 1k;
        large_client_header_buffers 2 1k;	
	types_hash_max_size 2048;




	include nginx.mimetypes.conf;
	default_type text/html;

	##
	# Logging Settings
	##
	access_log "c:/work/wt-nmp/log/nginx_access.log";
	error_log "c:/work/wt-nmp/log/nginx_error.log" warn; #debug or warn
	log_not_found on;  #enables or disables messages in error_log about files not found on disk. 
	rewrite_log off;

	#Leave this off
	fastcgi_intercept_errors off;


	gzip  off;

	index  index.php index.htm index.html;

	server {
		listen		127.0.0.1:80	default_server;
		#listen		[::1]:80	ipv6only=on;
		server_name  localhost;

		root "c:/work/wt-nmp/www/";
		autoindex on;
		
		allow		127.0.0.1;
		#allow		::1;
		deny		all;

		# deny access to .htaccess files, if Apache's document root
		# concurs with nginx's one
		#
		location ~ /\.ht {
		    deny  all;
		}


		#tools are now served from wt-nmp/include/tools/
		location ~ ^/tools/.*\.php$ {					
			root "c:/work/wt-nmp/include";
			try_files $uri =404; 
			include		nginx.fastcgi.conf;
			fastcgi_pass	php_farm;
		}
		location ~ ^/tools/ {
			root "c:/work/wt-nmp/include";
		}

		location ~ \.php$ {
		    try_files $uri =404; 
	            fastcgi_pass	php_farm;
		    include		nginx.fastcgi.conf;
	        }



	}


	
	include nginx.phpfarm.conf;
	


}
