Hello,

I'm trying to execute a perl script via FastCGI. I placed the search.pl
script in /var/www/htdocs/www.asciimx.com/cgi-bin:

$ ls -la /var/www/htdocs/www.asciimx.com/cgi-bin/                   
-r-xr-xr-x  1 root    bin     457 Dec 28 18:15 search.pl

Copied the perl executable to /var/www/bin:
$ ls -la /var/www/bin/               
-r-xr-xr-x   1 root  bin       7624 Dec 28 18:13 perl

/etc/httpd.conf:

server "www.asciimx.com" {
        listen on * tls port 443
        root "/htdocs/www.asciimx.com"
        tls {
                certificate "/etc/ssl/www.asciimx.com.fullchain.pem"
                key "/etc/ssl/private/www.asciimx.com.key"
        }
        location "/cgi-bin/*" {
                fastcgi socket "/run/slowcgi.sock"
        }
}

Perl script:

#!/bin/perl

use strict;
use warnings;

print "Content-Type: text/html\r\n";
print "\r\n";

print <<'HTML';
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Search results</title>
  </head>
  <body>
    <div class="container">
      <h1>Search results</h1>
        <p>This page is served by slowcgi on OpenBSD</p>
      </div>
  </body>
</html>
HTML

And try to access the page at https://www.asciimx.com/cgi-bin/search.pl, 
but I'm getting 500 internal server error.

Not sure where to get the logs, but '$ cat /var/log/messages | grep
slowcgi' not showing anything.

Any help is appreciated.

-- 
Sadeep
PGP: 103BF9E3E750BF7E

Reply via email to