I'm attempting to get a perl script up and running on Oracle Linux 8.5.
My Apache server and virtual hosts work with static html.
My test virtual host, fnu, has a very basic perl script named hw.pl in /var/www/fnu:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World. This is fnu.";
I have a link from index.html to hw.pl, permissions open and owner set to apache:
-rwxrwxrwx. 1 apache apache 89 Jun 4 20:59 hw.pl
lrwxrwxrwx. 1 apache apache 5 Jun 4 20:59 index.html -> hw.pl
Here's the site config in /etc/httpd/conf.d:
<VirtualHost *:80>
DocumentRoot "/var/www/fnu/"
ServerName fnu.[obscured].net
ServerAlias fnu
ErrorLog /var/log/fnu/error.log
CustomLog /var/log/fnu/request.log combined
</VirtualHost>
<Directory "/var/www/fnu">
Options +ExecCGI +SymLinksIfOwnerMatch
AddHandler cgi-script .cgi .pl
</Directory>
If I point a browser to fnu/hw.pl, I get the result I expect - the script output. If I point the browser to fnu/, I get the contents of the file. So, it's following the link, but it's not running it as a perl script once it gets there. Nothing useful in /var/log/fnu/error.log.
SELinux is set to Permissive.
I appreciate any assistance.
Script output as expected
Script file contents