2016-09-28 48 views
0

我有Debian伸展。我希望運行witty-examples包中的hello.wt。我使用[1]作爲指導,但fastcgi不起作用,並且fcgi工作了一段時間,但現在不再工作了。使用apache2在debian中安裝wt cgi fcgi wt

的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 

網站CONFI有:

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 

任何幫助將是巨大的,在此先感謝。

Juanfe

回答

0

我通過增加配置文件解決它的/ etc/apache2的/ suexec的/ juanfe,具有:

/var/www 
public_html/cgi-binhello.wt 

,並設置權限到/ var/WWW /公共HTML,和/ var/run/wt像:

$ sudo chown juanfe: /var/www/public-html 
$ sudo chown juanfe: /var/run/wt 
$ sudo chmod 755 /var/www/public-html 
$ sudo chmod 755 /var/run/wt