1. 安裝lighttpd
# /usr/ports/www/lighttpd ; make install clean
2. 安裝php5
# /usr/ports/lang/php5 ; make install
# /usr/ports/lang/php5-extensions ; make install
3. 建立log檔
# touch /var/log/lighttpd.access.log
# touch /var/log/lighttpd.error.log
# chown www:www /var/log/lighttpd.*
# chmod 640 /var/log/lighttpd.*
4. 檢查conf檔
server.modules = {
"mod_fastcgi", //這行的 mark 要拿掉(支援 PHP-FastCGI)
)
#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
fastcgi.server = ( ".php" =>
( "localhost" =>
(
#"socket" => "/var/run/lighttpd/php-fastcgi.socket", //預設值
"socket" => "/tmp/php-fastcgi.socket", //修改後
"bin-path" => "/usr/bin/php-cgi"
)
)
)
5. 啟動lighttpd
/usr/local/etc/rc.d/lighttpd start
開機自動執行lighttpd
# vi /etc/rc.conf
lighttpd_enable="YES"
- May 19 Mon 2008 19:23
-
FreeBSD 7 + lighttpd + php5 安裝
請先 登入 以發表留言。