<?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>Temporality &#187; apache</title>
	<atom:link href="http://www.sylin.net/blog/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sylin.net/blog</link>
	<description>my causerie</description>
	<lastBuildDate>Sat, 05 Mar 2011 18:32:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Install Apache+fastcgi+php on FreeBSD</title>
		<link>http://www.sylin.net/blog/2008/04/15/77</link>
		<comments>http://www.sylin.net/blog/2008/04/15/77#comments</comments>
		<pubDate>Tue, 15 Apr 2008 03:30:23 +0000</pubDate>
		<dc:creator>sylin</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.sylin.net/blog/?p=77</guid>
		<description><![CDATA[環境: 這篇的使用環境是 FreeBSD 7-Release @ 2008/04/12, 使用 ports 安裝 安裝: 安裝 apache2.2 並使用 worker mpm # cd /usr/ports/www/apache22; make WITH_MPM=worker all install 安裝以後使用 pkg_info 查看會顯示 apache-worker-2.2.8 Version 2.2 of Apache web server with worker MPM. 如果是預設的 prefork 則是顯示 apache-2.2.8        Version 2.2 of Apache web server with prefork MPM. 安裝 mod_fcgid # cd /usr/ports/www/mod_fcgid; make all [...]]]></description>
			<content:encoded><![CDATA[<h2>環境:</h2>
<p>這篇的使用環境是 FreeBSD 7-Release @ 2008/04/12, 使用 ports 安裝</p>
<p><span id="more-77"></span></p>
<h2>安裝:</h2>
<p>安裝 apache2.2 並使用 worker mpm</p>
<blockquote><p># cd /usr/ports/www/apache22; make WITH_MPM=worker all install</p></blockquote>
<p>安裝以後使用 pkg_info 查看會顯示<br />
<pre>apache-worker-2.2.8 Version 2.2 of Apache web server with worker MPM.</pre><br />
如果是預設的 prefork 則是顯示<br />
<pre>apache-2.2.8        Version 2.2 of Apache web server with prefork MPM.</pre><br />
安裝 mod_fcgid</p>
<blockquote><p># cd /usr/ports/www/mod_fcgid; make all install</p></blockquote>
<p>mod_fcgid 和 mod_fastcgi 的差別( from <a href="http://http//www.freshports.org/www/mod_fcgid/" target="_blank">www/mod_fcgid/pkg-descr</a> )</p>
<blockquote><p>mod_fcgid &#8212; an alternative FastCGI module for Apache2</p>
<p>mod_fcgid has a new process management strategy, which concentrates on<br />
reducing the number of fastcgi server, and kick out the corrupt<br />
fastcgi server as soon as possible.</p>
<p>mod_fcgid is binary-compatible with mod_fastcgi so your existing fastcgi<br />
programs do not need to be recompiled.  mod_fcgid supports suEXEC.</p></blockquote>
<p>安裝 php5</p>
<blockquote><p># cd /usr/ports/lang/php5; make all instal</p></blockquote>
<h2>設定:</h2>
<p>在 httpd.conf (/usr/local/etc/apache22/httpd.conf) 裡增加</p>
<blockquote><p>LoadModule fcgid_module libexec/apache22/mod_fcgid.so</p></blockquote>
<p>設定 FCGI php warpper，讓 .fcgi 和 .php 的檔案由 fcgid-script 來處理，並指定透過 php-cgi 來執行 .php</p>
<blockquote><p>&lt;IfModule mod_fcgid.c&gt;<br />
<span style="color: #00007f;">AddHandler</span> fcgid-<span style="color: #00007f;">script</span> .fcgi .php<br />
FCGIWrapper /usr/local/bin/php-cgi .php<br />
&lt;/IfModule&gt;</p></blockquote>
<p>重新啟動 apache2</p>
<h2>參考資料:</h2>
<ol>
<li><a title="FastCGI介紹" href="http://home.educities.edu.tw/shirock/comp/fastcgi.htm" target="_blank">FastCGI介紹</a></li>
<li><a title="Permanent Link to FreeBSD Configure Apache 2.2 PHP with FastCGI mod_fcgi Module" rel="bookmark" href="http://www.cyberciti.biz/faq/freebsd-apache22-fastcgi-php-configuration/">FreeBSD Configure Apache 2.2 PHP with FastCGI mod_fcgi Module</a></li>
<li><a title="C10K problem" href="http://www.kegel.com/c10k.html" target="_blank">The C10K problem</a><sup><a href="http://www.sylin.net/blog/2008/04/15/77#footnote_0_77" id="identifier_0_77" class="footnote-link footnote-identifier-link" title="指單一機器處理1萬個連線">1</a></sup></li>
<li><a id="apache_setup_with_php-fastcgi" name="apache_setup_with_php-fastcgi" href="http://wiki.vchartier.net/howtos:web:apache:php_fcgi">Apache  setup with <span class="search_hit">PHP</span>-FastCGI</a></li>
</ol>
<ol class="footnotes"><li id="footnote_0_77" class="footnote">指單一機器處理1萬個連線</li></ol><hr />
<p><small>© admin for <a href="http://www.sylin.net/blog">Temporality</a>, 2008. |
<a href="http://www.sylin.net/blog/2008/04/15/77">Permalink</a> |
<a href="http://www.sylin.net/blog/2008/04/15/77#comments">One comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.sylin.net/blog/2008/04/15/77&title=Install Apache+fastcgi+php on FreeBSD">del.icio.us</a>
<br/>
Post tags: <a href="http://www.sylin.net/blog/tag/apache" rel="tag">apache</a>, <a href="http://www.sylin.net/blog/tag/fastcgi" rel="tag">fastcgi</a>, <a href="http://www.sylin.net/blog/tag/php" rel="tag">php</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sylin.net/blog/2008/04/15/77/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

