<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[Nginx 502 Bad Gateway错误问题收集]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[服务器类]]></category>
<pubDate>Wed, 04 May 2011 13:56:35 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	1.请检查你的FastCGI进程是否启动<br/><br/>2.FastCGI进程不够使用<br/>请通过执行 netstat -anpo &#124; grep “php-cgi” &#124; wc -l 判断，是否接近你启动的FastCGI进程，接近你的设置，表示进程不够<br/><br/>3.执行超时<br/>请把<br/>fastcgi_connect_timeout 300;<br/>fastcgi_send_timeout 300;<br/>fastcgi_read_timeout 300;<br/>这几项的值调高<br/><br/>4.FastCGI缓冲不够<br/>nginx和apache一样，有前端缓冲限制<br/>请把<br/>fastcgi_buffer_size 32k;<br/>fastcgi_buffers 8 32k;<br/>这几项的值调高<br/><br/>5.Proxy缓冲不够<br/>如果你使用了Proxying，请把<br/>proxy_buffer_size&nbsp;&nbsp;16k;<br/>proxy_buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4 16k;<br/>这几项的值调高<br/><br/>6.https转发配置错误<br/>正确的配置方法<br/>server_name www.mydomain.com;<br/><br/>location /myproj/repos &#123;<br/><br/>set $fixed_destination $http_destination;<br/>if ( $http_destination ~* ^https(.*)$ )<br/>&#123;<br/>set $fixed_destination http$1;<br/>&#125;<br/><br/>proxy_set_header&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Host $host;<br/>proxy_set_header&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X-Real-IP $remote_addr;<br/>proxy_set_header&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Destination $fixed_destination;<br/>proxy_pass&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://subversion_hosts;<br/>&#125;<br/><br/>7.php脚本执行时间过长<br/>将php-fpm.conf的<value name=”request_terminate_timeout”>0s</value>的0s改成一个时间。<br/>Tags - <a href="http://www.zhanghaijun.com/tags/nginx/" rel="tag">nginx</a> , <a href="http://www.zhanghaijun.com/tags/gateway/" rel="tag">gateway</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] Nginx 502 Bad Gateway错误问题收集]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>