I am using: apache2 2.4 on Ubuntu 23 / WT (webtoolkit witty).
I am trying to use WT with fcgid. My hello.conf file is:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName hello
ServerAlias www.hello
DocumentRoot /var/www/localhost/htdocs/wt-examples/hello
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/localhost/htdocs/wt-examples/hello/>
Options +ExecCGI -Indexes +FollowSymLinks +MultiViews +SymLinksIfOwnerMatch
AllowOverride none
Require ip 127.0.0.1
</Directory>
</VirtualHost>
fcgid.conf is:
<IfModule mod_fcgid.c>
AddHandler fcgid-script .wt
FcgidIPCDir /var/lib/apache2/fcgid
FcgidIdleTimeout 100
FcgidMaxProcessesPerClass 1
FcgidInitialEnv WT_APP_ROOT=/var/www/localhost/htdocs/wt-examples/hello
FcgidWrapper /var/www/localhost/htdocs/wt-examples/hello .wt
</IfModule>
I compiled hello.wt with libwtfcgid not libwthttpd. Used chown and chmod for myuser and web-data with 755 permission.
When I try to connect Apache error log shows: "AH01276: Cannot serve directory /var/www/localhost/htdocs/wt-examples/hello/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive"
If use 127.0.0.1/hello.wt in the browser the error changes to: "(104)Connection reset by peer: [client 127.0.0.1:37754] mod_fcgid: error reading data from FastCGI server. [client 127.0.0.1:37754] End of script output before headers: hello.wt"
If I put a regular text index.htlm it shows it.
I think the problem was that fcgid was not handling. But now since it says "End of script output before headers: hello.wt", FastCGI receiving something but there is no header. So what is coming is not a proper page sent by hello.wt app. May be i should focus on WT configuration.
What is the problem do you think?