Apache HTTP Server /etc/apache2/conf-available/serve-cgi-bin.conf

Original ๐Ÿ“‹ Ubuntu 24.04 LTS (Noble Numbat) 18 lines

Works On

Viewing:
Ubuntu 24.04 LTS (Noble Numbat)
Same on:
Debian 13 (Trixie)
Other versions:

Details

Size
18 lines
MD5
c146ad61e8853896938a5d30d7aa6c89
SHA256
f3c96a2ec95fbb3371f2c18d77366fc09b07267a156beb4870943f3f029eb3f2

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/c146ad61e8853896938a5d30d7aa6c89?hint=serve-cgi-bin.conf
wget:
wget -O serve-cgi-bin.conf https://exampleconfig.com/api/v1/config/original/c146ad61e8853896938a5d30d7aa6c89?hint=serve-cgi-bin.conf

For AI Agents

You are a DevOps agent. Fetch the default Apache HTTP Server config for Ubuntu 24.04 LTS (Noble Numbat) from https://exampleconfig.com/api/v1/config/original/c146ad61e8853896938a5d30d7aa6c89?hint=serve-cgi-bin.conf. Compare with my current /etc/apache2/conf-available/serve-cgi-bin.conf and summarize differences and safe changes.

Copy this prompt into Claude, ChatGPT, or other AI assistants.

/etc/apache2/conf-available/serve-cgi-bin.conf
<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>

Install Apache HTTP Server

Alpine Linux

sudo apk add apache2

Debian

sudo apt update && sudo apt install apache2

Red Hat Enterprise Linux

sudo yum install httpd

Ubuntu

sudo apt update && sudo apt install apache2

File Location

File Path
/etc/apache2/conf-available/serve-cgi-bin.conf
Directory
/etc/apache2/conf-available/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this serve-cgi-bin.conf?

Restore it. Compare it. Start clean.

How do I restore Apache HTTP Server defaults?

Download, replace, restart.

Is serve-cgi-bin.conf safe for production?

Yes. This is exactly what shipped. Safe starting point.

How does this differ from other OS versions?

Defaults change. This one is specific to Ubuntu 24.04 LTS (Noble Numbat).

Can I use this for Apache HTTP Server troubleshooting?

Absolutely. Diff this against yours to spot the problem.