<?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>浮山狼de博客 &#187; lamp</title>
	<atom:link href="https://www.fushanlang.com/tag/lamp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fushanlang.com</link>
	<description>next station - 下一站，活在当下，且行且思</description>
	<lastBuildDate>Sat, 29 Nov 2014 15:14:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.5</generator>
	<item>
		<title>centos6+lighttpd+php-cgi</title>
		<link>https://www.fushanlang.com/centos6lighttpdphp-cgi-2224/</link>
		<comments>https://www.fushanlang.com/centos6lighttpdphp-cgi-2224/#comments</comments>
		<pubDate>Tue, 04 Sep 2012 07:38:13 +0000</pubDate>
		<dc:creator><![CDATA[fushanlang]]></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[webserver]]></category>
		<category><![CDATA[杂类]]></category>
		<category><![CDATA[lamp]]></category>

		<guid isPermaLink="false">http://www.fushanlang.com/blog/?p=2224</guid>
		<description><![CDATA[1. lighttpd <p>由于CentOS官方的源中没有Lighttpd包，因此需要手动导入RPMforge源。 请根据自己系统的情况选择如下32/64位、CentOS 5/CentOS 6操作系统的源并安装好，具体请浏览 http://pkgs.repoforge.org/rpmforge-release/ 选择合适的rpm安装包。</p> # wget -c http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm # rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm  2.lighttpd-fastcgi #yum install lighttpd-fastcgi php-cli #chkconfig --levels 235 lighttpd on //start on boot. 4、配置Lighttpd与PHP5 <p>将Lighttpd配置为fastCGI模式，只需要修改三个配置文件，并且比较简单。</p> <p>1、打开 /etc/php.ini 文件</p> <p>&#160;</p> 1 vi /etc/php.ini <p>在php.ini文件最后加如下一行语句并保存：</p> <p>cgi.fix_pathinfo = 1</p> <p>2、打开 /etc/lighttpd/modules.conf 文件：</p> <p>&#160;</p> 1 vi /etc/lighttpd/modules.conf <p>将 include “conf.d/fastcgi.conf” 一行取消注释并保存，如下图：</p> <p></p> <p>3、打开/etc/lighttpd/conf.d/fastcgi.conf 文件：</p> <p>&#160;</p> 1 <span style="color:#777"> . . . &#8594; Read More: <a href="https://www.fushanlang.com/centos6lighttpdphp-cgi-2224/">centos6+lighttpd+php-cgi</a></span>]]></description>
				<content:encoded><![CDATA[<h2>1. lighttpd</h2>
<p>由于CentOS官方的源中没有Lighttpd包，因此需要手动导入RPMforge源。<br />
请根据自己系统的情况选择如下32/64位、CentOS 5/CentOS 6操作系统的源并安装好，具体请浏览 http://pkgs.repoforge.org/rpmforge-release/ 选择合适的rpm安装包。</p>
<pre># wget -c http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm</pre>
<h2> 2.lighttpd-fastcgi</h2>
<pre>#yum install lighttpd-fastcgi php-cli
#chkconfig --levels 235 lighttpd on   //start on boot.</pre>
<h4>4、配置Lighttpd与PHP5</h4>
<p>将Lighttpd配置为fastCGI模式，只需要修改三个配置文件，并且比较简单。</p>
<p>1、打开 /etc/php.ini 文件</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<td><code>1</code></td>
<td><code>vi /etc/php.ini</code></td>
</tr>
</tbody>
</table>
<p>在php.ini文件最后加如下一行语句并保存：</p>
<blockquote><p>cgi.fix_pathinfo = 1</p></blockquote>
<p>2、打开 /etc/lighttpd/modules.conf 文件：</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<td><code>1</code></td>
<td><code>vi /etc/lighttpd/modules.conf</code></td>
</tr>
</tbody>
</table>
<p>将 include “conf.d/fastcgi.conf” 一行取消注释并保存，如下图：</p>
<p><a href="http://www.kuqin.com/upimg/allimg/120815/093Q06218-1.png"><img title="lighttpd-fastcgi" src="http://www.kuqin.com/upimg/allimg/120815/093Q06218-1.png" alt="" width="370" height="236" /></a></p>
<p>3、打开/etc/lighttpd/conf.d/fastcgi.conf 文件：</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<td><code>1</code></td>
<td><code>vi/etc/lighttpd/conf.d/fastcgi.conf</code></td>
</tr>
</tbody>
</table>
<p>找到 fastcgi.server这一节配置段，并将其全部反注释（使之生效），并修改为如下（注意红色为修改部分）：</p>
<blockquote><p>fastcgi.server = ( “.php” =&gt;<br />
( “php-local” =&gt;<br />
(<br />
“socket” =&gt; “/tmp/php-fastcgi-1.socket“,<br />
“bin-path” =&gt; “/usr/bin/php-cgi“,<br />
“max-procs” =&gt; 1,<br />
“broken-scriptfilename” =&gt; “enable”,<br />
)<br />
),<br />
( “php-tcp” =&gt;<br />
(<br />
“host” =&gt; “127.0.0.1″,<br />
“port” =&gt; 9999,<br />
“check-local” =&gt; “disable”,<br />
“broken-scriptfilename” =&gt; “enable”,<br />
)<br />
),</p>
<p>( “php-num-procs” =&gt;<br />
(<br />
“socket” =&gt; “/tmp/php-fastcgi-2.socket“,<br />
“bin-path” =&gt; “/usr/bin/php-cgi“,<br />
“bin-environment” =&gt; (<br />
“PHP_FCGI_CHILDREN” =&gt; “16″,<br />
“PHP_FCGI_MAX_REQUESTS” =&gt; “10000″,<br />
),<br />
“max-procs” =&gt; 5,<br />
“broken-scriptfilename” =&gt; “enable”,<br />
)<br />
),<br />
)</p></blockquote>
<p>最后保存即可。</p>
<p>现在可以重启Lighttpd使之生效：</p>
<table>
<tbody>
<tr>
<td><code>1</code></td>
<td><code>[root@www ~]</code><code># /etc/init.d/lighttpd restart </code></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>https://www.fushanlang.com/centos6lighttpdphp-cgi-2224/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.270 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2026-03-27 09:18:00 -->
