在Lighttpd中运行c++作为FastCGI
Running C++ as FastCGI in Lighttpd
我试图在Lighttpd中运行c++二进制文件作为FastCGI,但它不会启动。我尝试这样做:
fastcgi.server += (".cpp" =>
( "localhost" =>
(
"socket" => "/tmp/mysocket",
"bin-path" => "/var/www/index.cpp",
"max-procs" => 1
))
)
但是我不能使它工作。我想把c++保存在内存中以便快速启动
您应该这样调整您的配置:
fastcgi.server = (
"/api" => (
"api.fastcgi.handler" => (
"socket" => "/var/run/lighttpd/lighttpd-fastcgi-test-" + PID + ".socket",,
"check-local" => "disable",
"bin-path" => "/var/www/localhost/cgi-bin/test.fcgi",
"max-procs" => 30,
)
)
)
对于所有请求:localhost/api/some_test lighttp将调用fcgi可执行文件/var/www/localhost/cgi-bin/test.fcgi
相关文章:
- 将数组作为参数传递给函数安全吗?作为第三方职能部门,可以探索他们想要的之外的其他元素
- 为什么在没有显式默认构造函数的情况下,将另一个结构封装在联合中作为成员的结构不能编译
- 将Ref对象作为类成员
- 虚拟决赛作为安全
- 在VS2010-VS2015下编译时,如何使用decltype作为较大类型表达式的LHS
- 使用指向成员的指针将成员函数作为参数传递
- 我应该使用什么来代替void作为变体中的替代类型之一
- 何时提供默认参数作为模板参数
- 如何将 I->getType() 作为参数传递给 llvm 中的 CreateCall?
- C++使用数组作为多维数组,尽管将其初始化为带有指针的 1D
- C++匿名结构作为std::映射值
- C++:如何使函数只返回作为列表一部分的字符串
- 如何制作一个将函数作为参数的类方法
- 如何在C++中使用非静态成员函数作为回调函数
- 修改函数中的指针(将另一个指针作为参数传递)
- Clang bug?使用指针作为模板参数
- 函数作为模板参数,是否对返回类型强制约束
- 在C++中传递给函数时,为什么要指定数组大小作为参数
- FastCGI发送图像数据作为响应C++
- 在Lighttpd中运行c++作为FastCGI