Run a perl script in a browser via a link

mq flag

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 in /var/www/fnu:

print "Content-type: text/html\n\n";
print "Hello, World. This is fnu.";

I have a link from index.html to, permissions open and owner set to apache:

-rwxrwxrwx. 1 apache apache 89 Jun 4 20:59
lrwxrwxrwx. 1 apache apache 5 Jun 4 20:59 index.html ->

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

<Directory "/var/www/fnu">
Options +ExecCGI +SymLinksIfOwnerMatch
AddHandler cgi-script .cgi .pl

If I point a browser to fnu/, 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


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.