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.
精彩评论