[root@localhost conf]# cat nginx.conf | grep -v '#' | grep -v '^$'

worker_processes  1;  #worker 进程的数量
events {     #事件区块开始
		worker_connections  1024;   #每个worker进程支持的最大连接数
}   #事件区块结束
http {    #Http区块开始
		include       mime.types;  #Nginx 支持的媒体类型库文件包含
		default_type  application/octet-stream;    #默认的媒体类型
		sendfile        on;     #开启高效传输模式
		keepalive_timeout  65;   #连接超时
		server {     #一个server 代表一个站点
				listen       80;    #提供服务的端口80
				server_name  localhost;   #提供服务的域名主机名
				location / {      #程序根目录定位,如只需入域名或IP时,默认定位到‘/’下
						root   html;      #nginx目录下的http文件夹,程序根目录
						index  index.html index.htm;   #定义默认加载页页为index.html
				}   #localtion模块结束
				error_page   500 502 503 504  /50x.html;   #定义转到错误页
				location = /50x.html {       
						root   html;
				}
		}
}