红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Debian

debian安装lighttpd1.4.15+php5.2.3(fastcgi)

发布时间:2007-11-17 01:19:18来源:红联作者:redfans
安装pcre-7.4.tar.bz2
#./configure
#make && make install

安装lighttpd1.4.15.tar.gz
#./configure --prefix=/usr/local/servers/lighttpd
# make
# make install
# mkdir /usr/local/servers/lighttpd/conf
# mkdir /usr/local/servers/lighttpd/log
# mv ./doc/lighttpd.conf /usr/local/servers/lighttpd/conf/
# cp ./doc/rc.lighttpd.redhat /etc/init.d/lighttpd[可忽略]
# cp ./doc/spawn-php.sh /usr/local/servers/lighttpd/bin/
# chown -R lighttpd:lighttpd /usr/local/servers/lighttpd

安装php5.2.3.tar.gz
#./configure --prefix=/usr/local/servers/php5c --with-mysql=/usr/local/servers/mysql5 --with-freetype-dir=/usr/local/servers/freetype2 --with-png-dir=/usr/local/servers/libpng --with-gd=/usr/local/servers/gd2 --with-jpeg-dir=/usr/local/servers/jpegsrc --with-zlib --with-libxml-dir=/usr/local/servers/libxml2 --enable-mbstring --enable-sockets --with-ldap --enable-fastcgi --enable-force-cgi-redirect

配置 conf/lighttpd.conf
$HTTP["host"]=="www.host.cn"{
server.name="www.host.cn"
server.document-root="/www/web/htdocs"
server.errorlog="/usr/local/servers/lighttpd/log/www.host.cn-error.log"
accesslog.filename="/usr/local/servers/lighttpd/log/www.host.cn-access.log"
fastcgi.server=(".php"=>
("localhost"=>
(
"socket"=>"/tmp/php-fastcgi.socket",
"bin-path"=>"/usr/local/servers/php5c/bin/php-cgi"
)
)
)
}

配置 bin/spawn-php.sh
SPAWNFCGI="/usr/local/servers/lighttpd/bin/spawn-fcgi"
FCGIPROGRAM="/usr/local/servers/php5c/bin/php"
文章评论

共有 0 条评论