Get the default configuration file serve-cgi-bin.conf for Apache, optimized for Debian GNU/Linux 9 (stretch). This example configuration ensures optimal compatibility and performance for Apache, making it easy to set up and adjust to meet your needs.
Find and download the configuration file here: /etc/apache2/conf-available/serve-cgi-bin.conf.
For more configurations and setup guides, visit our related files section to further customize your system.
<IfModule mod_alias.c>
<IfModule mod_cgi.c>
Define ENABLE_USR_LIB_CGI_BIN
</IfModule>
<IfModule mod_cgid.c>
Define ENABLE_USR_LIB_CGI_BIN
</IfModule>
<IfDefine ENABLE_USR_LIB_CGI_BIN>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
</IfDefine>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Download the raw file with wget or curl
wget -O serve-cgi-bin.conf.example https://exampleconfig.com/static/raw/apache/debian9/etc/apache2/conf-available/serve-cgi-bin.conf
curl https://exampleconfig.com/static/raw/apache/debian9/etc/apache2/conf-available/serve-cgi-bin.conf > serve-cgi-bin.conf.example
Other config files you might find useful