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
/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>

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

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/c146ad61e8853896938a5d30d7aa6c89?hint=serve-cgi-bin.conf' /><config><app>Apache HTTP Server</app><os>Ubuntu 24.04 LTS (Noble Numbat)</os><location>/etc/apache2/conf-available/serve-cgi-bin.conf</location><lines>18</lines><md5>c146ad61e8853896938a5d30d7aa6c89</md5><sha256>f3c96a2ec95fbb3371f2c18d77366fc09b07267a156beb4870943f3f029eb3f2</sha256></config></prompt>

Paste into Claude, ChatGPT, or any AI assistant.

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?

Use it to restore a missing default, confirm what shipped, or diff against your current Apache HTTP Server config.

How do I restore Apache HTTP Server defaults?

Download the file, back up the current one in /etc/apache2/conf-available/serve-cgi-bin.conf, replace it, then reload or restart Apache HTTP Server.

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

It is the vendor default for Ubuntu 24.04 LTS (Noble Numbat). Treat it as a baseline and review security and performance settings before production use.

How does this differ from other OS versions?

Defaults vary by distro and version. This copy matches Ubuntu 24.04 LTS (Noble Numbat).

Can I use this for Apache HTTP Server troubleshooting?

Yes. Diff it against yours to find drift, then restore only the sections you need.