nginx编译的配置文件

文件名称nginx.conf


user  www;
worker_processes  2;

error_log /data/nginx/logs/error.log error;

pid  /var/run/nginx/nginx.pid;


events {
    worker_connections  10240;
	use epoll;
	multi_accept on;
}


http {
    include      				 	mime.types;
    default_type  					application/octet-stream;
	client_body_buffer_size 		16k;
	client_body_temp_path 			/tmp/client_body_temp;
	client_body_timeout 			30;
	client_header_buffer_size 		64k;
	large_client_header_buffers 4 	64k;
	client_header_timeout 			30;
	client_max_body_size 			64m;
	keepalive_timeout 				3;
	tcp_nodelay 					on;
	send_timeout 					30;
	sendfile 						on;
	tcp_nopush 						on;
	server_names_hash_max_size 		512;
	server_names_hash_bucket_size 	128;
	server_tokens 					off;
	open_file_cache 				off;
	
#index
	index index.php index.html index.htm;
	
#fastcgi
	fastcgi_connect_timeout 	60;
	fastcgi_read_timeout 		60;
	fastcgi_send_timeout 		60;
	fastcgi_temp_path 			/tmp/fastcgi_temp 1 2;
	fastcgi_buffer_size 		128k;
	fastcgi_buffers 			256 4k;
	fastcgi_max_temp_file_size 	256k;
	fastcgi_intercept_errors 	on;
	fastcgi_index 				index.php;
	
#proxy
	proxy_temp_path 			/tmp/proxy_temp;
	proxy_buffer_size 			4k;
	proxy_buffering 			on;
	proxy_buffers 				256 4k;
	proxy_busy_buffers_size 	8k;
	
#gzip
	gzip 						on;
	gzip_buffers 				64 4k;
	gzip_comp_level 			1;
	gzip_http_version 			1.1;
	gzip_min_length 			1024;
	gzip_types 					text/css text/xml text/plain text/vnd.wap.wml application/x-javascript application/rss+xml application/xhtml+xml;
	
#realip module
	set_real_ip_from 			127.0.0.1;
	set_real_ip_from 			10.0.0.0/8;
	set_real_ip_from 			172.16.0.0/20;
	set_real_ip_from 			192.168.0.0/16;
	set_real_ip_from 			192.168.1.0/24;
	real_ip_header 				X-Real-IP;
	#real_ip_header 			X-Forwarded-For;
	
#log
	log_format main '$remote_addr - $remote_user [$time_local] "$request" '
				'$status $body_bytes_sent "$http_referer" '
				'"$http_user_agent" "$http_x_forwarded_for"';
				
#virtualhost
	include vhosts/*.conf;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值