#### On barre,
cd /etc/apache2
ls -l conf-enabled/serve-cgi-bin.conf
conf-enabled/serve-cgi-bin.conf -> ../conf-available/serve-cgi-bin.conf
cat conf-enabled/serve-cgi-bin.conf
Define ENABLE_USR_LIB_CGI_BIN
Define ENABLE_USR_LIB_CGI_BIN
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
####----------------------------------------- END conf-enabled/serve-cgi-bin.conf
#### is ENABLE_USR_LIB_CGI_BIN defined?
#### On holt, this is a set of files made/changed for cgi-bin execution:
/home/hgs/div/my-etc-apache2.tar
#### HOW TO:
#### https://code-maven.com/set-up-cgi-with-apache
#### https://www.youtube.com/watch?v=dKKshPF2OJ4 # 4:50 ...
#### On raspberrypi
sudo apt-get update
sudo apt-get --fix-missing upgrade
sudo apt-get install apache2
sudo apt-get install php-common libapache2-mod-php php-cli
sudo apt-get install apache2-doc
#### whereby ./mods-enabled/php7.3.conf and ./mods-enabled/php7.3.load are created
sudo a2enmod cgi
sudo a2enmod php
sudo service apache2 restart
#### Better:
sudo apache2ctl -k restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1.
Set the 'ServerName' directive globally to suppress this message
#### Either
/etc/apache2/apache2.conf:ServerName raspberrypi
#### or
/etc/apache2/apache2.conf:ServerName localhost
#### ? not sure, http://raspberrypi/pi doesn't always connect. 192.168.0.21 does
#### /etc/apache2/apache2.conf updated to include server name:
#ServerRoot "/etc/apache2"
ServerName raspberrypi
#### /etc/apache2/apache2.conf updated to include directories
AllowOverride None
Require all granted
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
#### DocumentRoot gets defined in sites-enabled/000-default.conf:
#### ServerAlias resolves DSN, "raspberrypi" -> 192.168.0.21
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName raspberrypi
ServerAlias raspberrypi
ServerAdmin pi@localhost
DocumentRoot /var/www/html
#### apache2 log dir is /var/log/apache2
#### MANUAL/en:
/usr/share/doc/apache2-doc/manual/
http://holt.oso.chalmers.se/hgs/4me/apache2.man/en/
#### FURTHER READING:
https://code-maven.com/set-up-cgi-with-apache