我有 Debian 伸展。我想运行 witty-examples 包中的 hello.wt。我使用 [1] 作为指导,但 fastcgi 不起作用,fcgi 工作了一段时间,但现在不再工作了。
Apache2 的错误日志显示:
[2016-Sep-28 11:48:59.548562] 5219 - [info] "WServer/wthttp: fatal: Document root was not set, or was set to the empty path. Use --docroot to set the HTML root directory."
[Wed Sep 28 11:48:59.549866 2016] [fcgid:warn] [pid 5163:tid 139718772893440] (104)Connection reset by peer: [client ::1:54290] mod_fcgid: error reading data from FastCGI server
[Wed Sep 28 11:48:59.549926 2016] [core:error] [pid 5163:tid 139718772893440] [client ::1:54290] End of script output before headers: cgi-binhello.wt
配置文件是:
# suexec/www-data
/var/www
public_html/cgi-binhello.wt
或者我用相同的结果进行了调查:
# suexec/www-data
/var/www
public_html/hello.wt
该网站配置有:
DocumentRoot /var/www/wt
SuexecUserGroup juanfe juanfe
ScriptAlias "/cgi-bin/" "/var/www/public_html/cgi-bin"
<Directory /var/www/wt/>
Allow from all
Options +ExecCGI
AddHandler cgi-script .wt
</Directory>
fcgi.conf 是这样的:
<IfModule mod_fcgid.c>
AddHandler fcgid-script .wt
SocketPath /var/lib/apache2/fcgid/sock
IdleTimeout -1
ProcessLifeTime -1
MaxProcessCount 10
DefaultMaxClassProcessCount 10
DefaultMinClassProcessCount 1
</IfModule>
hello.wt文件属于我的uid和gid,也就是juanfe,我的普通用户。我有托盘:
/var/www/public_html/cgi-binhello.wt
与
/var/www/public_html/hello.wt
任何帮助都会很棒,在此先感谢。
胡安菲