<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Life - WeiG &#187; http</title>
	<atom:link href="http://www.weigblog.com/tag/http/feed" rel="self" type="application/rss+xml" />
	<link>http://www.weigblog.com</link>
	<description>Yet another Life</description>
	<lastBuildDate>Thu, 05 Jan 2012 03:13:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>解决nginx和php-fastcgi上传大文件的问题</title>
		<link>http://www.weigblog.com/2009/10/03/nginx-php-fastcgi-upload-big-files.html</link>
		<comments>http://www.weigblog.com/2009/10/03/nginx-php-fastcgi-upload-big-files.html#comments</comments>
		<pubDate>Sat, 03 Oct 2009 14:26:51 +0000</pubDate>
		<dc:creator>Wei</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[max]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[size]]></category>

		<guid isPermaLink="false">http://www.weigblog.com/?p=495</guid>
		<description><![CDATA[近来需要在blog中上传一些比较大的照片，却发现无论是Flash Uploader还是Web Uploader均无法上传。经过一番试验，发现这种情况仅发生在上传较大图片的时候，而对于几百KB的图片却不出现问题。 我的Server使用了nginx和php-fastcgi，经过检查php的配置文件，发现upload_max_filesize、post_max_size都不应该会影响上传。从phpinfo()来看，这些配置也都正确读入了。经过查看/var/log/nginx/error.log，发现其最下面几行出现日志： 既然log是nginx报出来的，那问题自然出现在nginx上。经过查询nginx的wiki，解决方案如下： 在/etc/nginx/nginx.conf中添加如下配置： 之后运行/etc/init.d/nginx reload重新载入配置文件，上传搞定。]]></description>
			<content:encoded><![CDATA[<p>近来需要在blog中上传一些比较大的照片，却发现无论是Flash Uploader还是Web Uploader均无法上传。经过一番试验，发现这种情况仅发生在上传较大图片的时候，而对于几百KB的图片却不出现问题。</p>
<p>我的Server使用了nginx和php-fastcgi，经过检查php的配置文件，发现upload_max_filesize、post_max_size都不应该会影响上传。从phpinfo()来看，这些配置也都正确读入了。经过查看/var/log/nginx/error.log，发现其最下面几行出现日志：</p>
<pre class="brush: plain; title: ; notranslate">
2009/10/03 22:06:23 [error] 6029#0: *20 client intended to send too large body: 1345385 bytes, client: x.x.x.x, server: weigblog.com, request: &quot;POST /wp-admin/async-upload.php HTTP/1.1&quot;, host: &quot;www.weigblog.com&quot;
</pre>
<p>既然log是nginx报出来的，那问题自然出现在nginx上。经过查询nginx的wiki，解决方案如下：</p>
<p>在/etc/nginx/nginx.conf中添加如下配置：</p>
<pre class="brush: bash; highlight: [3]; title: ; notranslate">
http {
        ...
        client_max_body_size 100m;
        ...
}
</pre>
<p>之后运行/etc/init.d/nginx reload重新载入配置文件，上传搞定。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weigblog.com/2009/10/03/nginx-php-fastcgi-upload-big-files.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

