server {
	listen   ipv4�����;
	listen [ipv6�����];
	server_name site.ru www.site.ru;

	charset utf-8;

	root  /home/www;

	access_log  /var/log/nginx/www.access.log;
	error_log /var/log/nginx/www.error.log;

	error_page  404  /404.php;
	error_page  500 502 503 504  /50x.html;

	location /404.php {
		root  /home/www;
	}

	location = /50x.html {
		root   html;
	}

   location / {
		index index.php index.html;
	}

   location ~* \.(?:ico|css|js|gif|jpe?g|png|zip|tgz|gz|rar|bz2|doc|xls|pdf|ppt|txt|tar|wav|mp3|bmp|rtf|js|swf|flv|xml|avi)$ {
	   expires 1h;
	 add_header Pragma public;
   add_header Cache-Control "public, must-revalidate, proxy-revalidate";
   }

   location ~ /\.ht {
		deny  all;
   }

   location  ~ \.php$ {
		 limit_req   zone=php  burst=10;

		if (!-f $request_filename) {
			return 404;
		}
		proxy_pass http://127.0.0.1:80;
		proxy_redirect     off;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;

		proxy_connect_timeout      60;
		proxy_send_timeout         60;
		proxy_read_timeout         60;
   }
}