开发者

How can environment variables be passed from lighttpd config file to a running FCGI/SCGI backend?

It seems that scgi.server's "bin-environment" setting only passes environment variables to newly spawned processes, not to a continuously running SCGI back-end.

I tried setenv.add-environment and setenv.add-request-header but neither is accesible from the (C++) back-end over the CGI interface

开发者_Python百科

Any ideas?


I was actually able to resolve this using setenv.add-request-header. Turns outThe passed in custom header is prefixed by "HTTP_", so if the ligghtpd.conf file has a directive:

setenv.add-request-header = (
  "FOO" => "1"
)

Then the scgi backend should look for the request header HTTP_FOO instead of FOO.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜