Hi!

I am trying to use fastcgi in OpenBSD 5.7 httpd but keep getting "500
Internal Server Error".

httpd.conf:
######################################################
ext_addr="*"
server "www.domain.com" {
        listen on $ext_addr tls port 443
        tls dhe "auto"
        connection { max requests 500, timeout 3600 }
        location "/cgi-bin/*" {
                fastcgi socket "/run/fcgi.socket"
                root "/"
        }
        root "/htdocs/www.domain.com"
}
######################################################

/var/www/cgi-bin/fcgi-test.cgi:
######################################################
#!/usr/bin/perl
  use CGI::Fast;
  $ENV{FCGI_SOCKET_PATH} = "/run/fcgi.socket";
  $ENV{FCGI_LISTEN_QUEUE} = 100;
  my $cnt=0;
  while ($q = new CGI::Fast) {
   print "Content-type: text/html\r\n\r\n";
   print "<head>\n<title>FastCGI Demo Page (perl)</title>\n</head>\n";
   print  "<h1>FastCGI Demo Page (perl)</h1>\n";
   print "This is coming from a FastCGI server.\n<BR>\n";
   $cnt++;
   print "This is connection number $cnt\n";
  }
######################################################

I was able to start a simple cgi (print "hello world\n";) by using
slowcgi so I believe my perl environment in chroot is more or less OK.
Also the script itself seems to be OK:

# chroot /var/www /usr/bin/perl -c /cgi-bin/fcgi2.cgi
/cgi-bin/fcgi2.cgi syntax OK

Things that might be part of the problem:
- No socket file "/run/fcgi.socket" is being created when I start httpd.
- Nothing was ever written to /var/www/logs/error.log, not even when I
tried to start httpd with a boguous httpd.conf. However,
/var/www/logs/access.log has logs from access to static html.

Any hints about where to find out more about the "500 Internal Server
Error"? I have no more hints to follow and I could not find one single
example of a working httpd.conf along with a perl fastcgi example in the
web. All discussions seem to explain how to use cgi with slowcgi
instead. But that's not what I'm looking for.

Thanks in advance!

T.

Reply via email to