是否可以将 lighttpd 配置为在 Windows7 上生成它自己的 PHP 实例?

是否可以将 lighttpd 配置为在 Windows7 上生成它自己的 PHP 实例?

目前,这是我启动 PHP 和 lighttpd 的方式,并且它运行良好:

start /b php-cgi -c .\php-debug.ini  -b 127.0.0.1:521
start /b LightTPD.exe 

有时 PHP 会崩溃,然后出现 503 错误,直到我重新启动它。我想配置 lighttpd 来管理 PHP 实例,以便它可以帮我重新启动 PHP。我修改了我的 lighttpd 配置,添加了bin-path

server.modules = (
    "mod_access",
    "mod_accesslog",
    "mod_rewrite",
    "mod_redirect",
    "mod_evhost",
    "mod_fastcgi",
    "mod_status"
)

fastcgi.server = ( 
    ".php" => (
        "localhost" => (
            "host" => "127.0.0.1", 
            "port" => 521, 
            "bin-path" => "C:\PHP\php-cgi.exe",
            "broken-scriptfilename" => "enable" 
        )
    )
)

当我启动 lig​​httpd 时,我在错误日志中看到以下内容 - 无论 php 是否正在运行。

2013-01-26 16:23:20: (log.c.166) server started
2013-01-26 16:23:20: (mod_fastcgi.c.1103) the fastcgi-backend C:\PHP\php-cgi.exe failed to start:  
2013-01-26 16:23:20: (mod_fastcgi.c.1107) child exited with status 0 C:\PHP\php-cgi.exe
2013-01-26 16:23:20: (mod_fastcgi.c.1110) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version. If this is PHP on Gentoo, add 'fastcgi' to the USE flags.  
2013-01-26 16:23:20: (mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed.  
2013-01-26 16:23:20: (server.c.982) Configuration of plugins failed. Going down.

我尝试通过添加/删除/编辑我通常传递给 PHP 的bin-path参数来进行尝试。-c .\php-debug.ini -b 127.0.0.1:521

有什么建议吗?

相关内容