Score:0

fcgid is not handling. Why?

pl flag
lid

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?

djdomi avatar
za flag
because hello.wt is no index file that has been declared
lid avatar
pl flag
lid
@djdomi I directly addressed hello.wt in the browser. FastCGI receives non proprer page. May be hello.wt is not running and fastcgi is reading the raw binary I don't know.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.