【发布时间】:2015-05-03 07:07:51
【问题描述】:
如何设置 lighttpd 以使生成的进程可以使用环境变量?
我有一个通过 CGI 作为 URL 调用的可执行文件(例如 http://.../cgi-bin/executable.bin)。
可执行文件需要加载库并使用export FOO=BAR读取在/etc/profile中设置的环境变量。
当我尝试访问该 URL 时,它会生成内部服务器错误 (500),这是由一个空的环境变量引起的,该变量在 /etc/profile 中正确设置。
【问题讨论】:
标签: linux cgi environment-variables server lighttpd