Forum

CGI troubles

Kyle
8 November 2011, 01:11
So I feel like I have been on crazy pills all day. Been a happy user of Hiawatha for several years. Today I try to configure it on a new box. CGI just won't work. At all.

The only error message is
127.0.0.1|/srv/http/hiawatha/test.cgi|no output

This seems to pop up every other month or so on the forums. But before you say the obvious, it is executable and produces output.

hiawatha.conf, simple and boring:

ServerId = http
ConnectionsTotal = 150
ConnectionsPerIP = 10

SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log
#CommandChannel = 81,4eae35f1b35977a00ebd8086c259d4c9

Binding {
Port = 80
#Interface = 127.0.0.1
}

Hostname = 127.0.0.1
WebsiteRoot = /srv/http/hiawatha
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
CGIextension = cgi
#WaitForCGI = no
ExecuteCGI = yes
TimeForCGI = 30


/srv/http/hiawatha/test.cgi:

#! /bin/bash

echo -e "Content-Type: text/html\r\n\r\n"
echo -e "<html><body>one hand clapping</body></html>"


Am I missing something embarrassingly obvious?

Hiawatha version: 7.8
Operating System: Arch Linux 64 bit
Hugo Leisink
8 November 2011, 09:05
To be honest, I have no idea. Maybe something like AppArmor or SELinux which is bugging you?

What do you mean with "This seems to pop up every other month or so on the forums."? What forums?
Kyle
8 November 2011, 12:42
No AppArmor or SELinux. Not even a fire wall (right now, anyway).

It comes up on this forum from time to time [www.google.com].

Thanks though. Fuess this box will just be used for static content until I can get to the bottom of this.
Hugo Leisink
8 November 2011, 14:41
Most of the time, the cause is outside Hiawatha. PHP not installed, incorrect path to cgi-wrapper, AppArmor blocking access to CGI, CGI not working properly.

Did you switch to the user Hiawatha runs as before executing the CGI as test?
This topic has been closed.