How to run CGI script - perl


#1

Does anyone successfully run a CGI script? I followed the instruction in below page, however, it shows the content of the script file, not running the script.

https://support.cloudways.com/enable-cgi-scripts-execution-on-your-cloudways-server/

So my .htaccess looks like this.

Options +ExecCGI
AddHandler cgi-script .cgi .pl

My test page is this
http://phpstack-225243-692979.cloudwaysapps.com/test.cgi

The script runs on command line ok.

$ ./test.cgi 
Content-type: text/html; charset=iso-8859-1

<html><body>Test Page</body></html>

Permission is 755.

I’m suspecting that the necessary CGI module is not running. I’ve created this site as “PHP Custom App”.

I need to make perl scripts run to move some legacy sites, and appreciate any help.