1. Caddy version (caddy version
):
Version 2
2. How I run Caddy:
I have a production web site running on Windows IIS 10. with Perl CGI. All is well except is Windows and is very slow. I am hoping to migrate to Linux Ubuntu and convert CGI to FastCGI. I have a test server setup and can serve static HTML pages from Caddy. Https is working also. I am trying to figure out how to set up FastCGI with Perl. In IIS 10 I am using old style CGI. Any help would be appreciated to help me get to a “Hello World” with Caddy and FastCGI / Perl.
I installed Caddy using this tutorial
I am relatively new to Linux.
a. System environment:
Ubuntu 22.04
No Docker
Perl v5.34.0
b. Command:
Paste command here.
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
d. My complete Caddyfile or JSON config:
{
email not_my_real_email@gmail.com
}
hashlogger.com {
encode gzip
file_server
}
3. The problem I’m having:
Initial setup of Perl FastCGI and example hello world script.
4. Error messages and/or full log output:
5. What I already tried:
I placed a simple CGI script using FastCGI format into the root web server directory. I simply displayed the text.
#!/usr/bin/perl
use strict;
use CGI::Fast;
my $count = 0;
while (my $q = CGI::Fast->new) {
print(“Content-Type: text/plain\n\n”);
print("Process ID: $$; Count is: " . ++$count);
}