LSWS w/ Perl

ahoy

New Member
#1
Trying to get Perl working with a custom LSWS install at Runcloud.io, following configuration notes here:
https://docs.litespeedtech.com/lsws/extapp/perl/configuration/

FCGI.pm is here:
/usr/lib/x86_64-linux-gnu/perl5/5.34/FCGI.pm

I have added the following extprocessor and scripthandler to /etc/lsws-rc/conf.d/fatal-oval.d/handler.conf:

Code:
scripthandler fatal-oval  {
  suffix                  pl
  type                    fcgi
  handler                 PerlFastCGI
}

extprocessor fatal-oval {
  type                    fcgi
  name                    PerlFastCGI
  address                 UDS://tmp/lshttpd/fatal-oval-perl.sock
  maxConns                35
  env                     FCGI_PERL_MAX_REQ=1000
  env                     LSAPI_CHILDREN=35
  initTimeout             60
  retryTimeout            0
  persistConn             1
  pcKeepAliveTimeout      30
  respBuffer              0
  autoStart               1
  backlog                 100
  instances               1
  memSoftLimit            2074M
  memHardLimit            2074M
  procSoftLimit           400
  procHardLimit           500
  path                    /usr/lib/x86_64-linux-gnu/perl5/5.34/FCGI.pm
I have placed a test.pl script from the Perl Configuration page in the public html root:

Code:
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print <<EndOfHTML;
<html><head><title>Perl Environment Variables</title></head>
<body>
<h1>Perl Environment Variables</h1>
EndOfHTML
foreach $key (sort(keys %ENV)) {
  print "$key = $ENV{$key}<br>\n";
}
print "</body></html>";
The outcome is that the browser downloads the test.pl as opposed to the server executing it.
Not sure where I have gone wrong but perhaps someone can help?

Thanks in advance, Warren
 
Top