What additional (probably basic) configuration do I need to do to enable CGI execution under Apache 2.4?
I'm setting up a system, and I seem to be missing a basic aspect of Apache configuration. I am getting a 403 error when I attempt to load 127.0.0.1/index.cgi.
My sites-enabled conf file is:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/christos/link
<Directory />
Options None
AllowOverride None
</Directory>
<Directory /home/christos/link>
Options ExecCGI Indexes FollowSymLinks MultiViews
AllowOverride None
</Directory>
AddHandler cgi-script .cgi
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
--UPDATE--
When I try to access index.cgi by a browser, I get the error:
[Sun Feb 21 08:17:22.696180 2021] [authz_core:error] [pid 357134:tid 139716048369408] [client ::1:36924] AH01630: client denied by server configuration: /home/christos/neo-fathers/document_root/index.cgi
Checking your Apache version, configuration and log, you need to add Require all granted
for each directory:
... (rest of conf)
Require all granted
</Directory>
You can change all
to something more specific if you prefer, check apache docs.