I gave this a go on my Windows 10
VMware Player - Ubuntu 16.04 LTS guest
sudo apt-get install aptitude
sudo aptitude install apache2
# verify install success - browse to localhost - default Apache index page
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y
sudo apt-get install libapache2-mod-php7.0
sudo apache2ctl restart
sudo nano /var/www/html/testphp.php
<?php phpinfo(); ?>
# verify PHP config success - browse to localhost/testphp.php
sudo aptitude install libapache2-mod-perl2
sudo mkdir /home/www
sudo mkdir /home/www/cgi-bin
sudo nano /etc/apache2/sites-enabled/000-default.conf
ScriptAlias /cgi-bin/ "/home/www/cgi-bin/"
<Directory /home/www/cgi-bin/>
Options +FollowSymLinks +ExecCGI
AddHandler cgi-script .cgi .pl
Require all granted
</Directory>
cd /home/www/cgi-bin
sudo nano perltest.pl
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello there!<br />\nJust testing.<br />\n";
for ($i=0; $i<10; $i++)
{
print $i."<br />\n";
}
sudo chmod a+x perltest.pl
sudo apache2ctl restart
# verify Perl config success - cd /home/www/cgi-bin - at prompt ./perltest.pl
# verify Perl config success - browse to localhost/cgi-bin/perltest.pl
I’ve done a bit of hacking from what was posted at the ubuntugeek site trying to resolve my last hurdle - getting the script to run in Firefox instead of getting the “open with / save” dialog.
I’m too bushed to keep at it tonight, but maybe the above will help some,