[Mon Jan 27 19:44:02.915926 2020] [fcgid:warn] [pid 20681] (104)Connection reset by peer: [client xx.xxx.xxx.xxx:xxxxx] mod_fcgid: error reading data from FastCGI server [Mon Jan 27 19:44:02.915973 2020] [core:error] [pid 20681] [client xx.xxx.xxx.xxx:xxxxx] End of script output before headers: test.fcgi #!/usr/bin/perl use FCGI; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use Encode; #use CGI::Fast; #the CGI:Fast example from https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html is working; my FCGI example is not. my $count = 0; my $request = FCGI::Request(); while($request->Accept() >= 0) { $body = "Content-type:text/html; charset=utf-8\r\n\r\n"; $body .= ''; $body .= '

Woohoooo!

': $body .= ''; $body .= ''; $body = encode_utf8($body); print $body; }