Install wt cgi in debian with apache2 suexec fcgi wt

276 Views Asked by At

I have Debian stretch. I will like to run the hello.wt that come in the witty-examples package. I use [1] as guide, but fastcgi doesn't work, and fcgi worked for a time, but now is not working anymore.

The Apache2's error log show:

[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

The config files are:

# suexec/www-data
/var/www
public_html/cgi-binhello.wt

Or I had probe with the same result with:

# suexec/www-data
/var/www
public_html/hello.wt

The site confi has:

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>

The fcgi.conf is like:

<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>

The hello.wt file belong to my uid and gid, that is juanfe, my regular user. And I have tray with:

/var/www/public_html/cgi-binhello.wt

And with

/var/www/public_html/hello.wt

Any help will be great, thanks in advance.

Juanfe

1

There are 1 best solutions below

0
Juan Fernando Jaramillo Botero On

I solve it by adding the config file /etc/apache2/suexec/juanfe, with:

/var/www
public_html/cgi-binhello.wt

And setting the permissions to the /var/www/public-html, and /var/run/wt like:

$ 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