【问题标题】:Lighttpd server configuration to run cgi binaries using fast cgiLighttpd 服务器配置以使用快速 cgi 运行 cgi 二进制文件
【发布时间】:2013-08-26 09:07:45
【问题描述】:

我有一个在 linux 嵌入式盒子中运行的 lighttpd 网络服务器。 Lighttpd 为 php 启用了 Fastcgi。如何编辑我的 lighttpd.conf 以便使用 fastcgi 运行 cgi 二进制文件?另外,我的 linux 机器的文档根目录中没有 cgi-bin 文件夹。

我引用了 lighttpd.conf 的摘录,它启用了 fastcgi 和 php 配置。另外,可以看到cgi.assign被注释掉了。

server.modules              = (
#                               "mod_rewrite",
                                "mod_redirect",
#                               "mod_alias",
                                "mod_access",
#                               "mod_trigger_b4_dl",
#                               "mod_auth",
#                               "mod_status",
#                               "mod_setenv",
                                "mod_fastcgi",
#                               "mod_proxy",
#  

## 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" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/bin/php-cgi -c /etc/php.ini"
                                 )
                               )
                            )

#### CGI module
#cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
#                               ".cgi" => "/usr/bin/perl" )
#

【问题讨论】:

    标签: fastcgi lighttpd gsoap cgi-bin


    【解决方案1】:

    您需要使用 cgi 选项编译 php。基本上它是一个独立的 php。

    【讨论】:

    • 我用 --enable-fastcgi 选项编译了 php。我是否可以使用 php-cgi 运行其他 cgi 二进制文件(gSOAP)?如果是这样,怎么办?您可以在我的 linux 框中看到列出的 PHP 模块 [/bin/php-cgi -m ---> [PHP Modules], cgi-fcgi, date, libxml, Reflection, session, SimpleXML, standard, ]
    • 您已经配置了二进制路径。我看不出有什么不对。您可以发布更多配置文件吗?错误信息是什么?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-09-10
    • 2019-01-05
    • 2015-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-11
    相关资源
    最近更新 更多