I'm using Apache on CentOS and am trying to run a Perl CGI script as directory index so it will run automatically as a subdomain. I added
DirectoryIndex script.cgi and added a
Directory stanza noting the path
/var/www/folder enabling the script to run.
The only way the script would run is if I also add a
File *.cgi stanza within the directory stanza (or even outside of it) and move the relevant section to it:
Options +ExecCGI and SetHandler perl-script
I'm still learning Apache, and wondering why just referencing the folder wasn't enough. Why do I also have to add a File stanza and reference
*.cgi? The CGI script would have been the only file in the folder.