在windows上配置lighttpd+php(fastcgi)成功
以前用其它几个webserver没有成功实现fastcgi,如myserver和xitami。现在lighttpd上成功了。
1. lighttpd-inc.conf 的配置:
关键的地方是:
server.modules = ( ... "mod_fastcgi", ...)
fastcgi.server = ( ".php" =>( "localhost" =>("host" => "127.0.0.1","port" => 521 )))
2. 注意:在lighttpd-inc.conf 上说的那个开启fastcgi的方法在windows上行不通,可能是在linux上的方法:
#### 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" => "C:/LightTPD/TMP/php-fastcgi.socket",
# "bin-path" => "C:/LightTPD/PHP/php-cgi.exe"
# )
# )
# )
3. 但仅仅这样启动lighttpd后还是不行的,还需要运行
php-cgi.exe -b 127.0.0.1:521
4.最后测试,不断刷新一个php页面,在任务管理器里面可以看到只有一个lighttpd的进程。 更详细的说明可以参考网上的文章。如: http://www.diybl.com/course/4_webprogram/php/phpjs/20071112/85689.html
