Recently I rebuilt my personal mail server (and Mailman list server) on a new version of Ubuntu. Everything went well and the Mailman list worked fine, except that all of the CGI-BIN scripts would download in the browser, rather than executing.

I spent a lot of time troubleshooting this issue, making various changes to my Mailman configuration, all to no avail. Eventually, I gave up and just let it sit...mail was working, so it wasn't an emergency.

However, this weekend I decided I needed the interface working, so I dove back into troubleshooting the problem and looking for answers. I again made several changes to the configuration, tweaking ScriptAlias and whatnot, again to no avail.

Then I stumbled upon this article Mailman web interface not working on AskUbuntu.

Viola! The answer was that CGIs weren't ever going to work, because by default in Apache 2.4 the module mod_cgid wasn't enabled. To correct, just do:

# a2enmod cgid

That's it. An easy solution to a difficult to diagnose problem. The real issue is that the behavior of the Apache server is exactly the same whether you have mod_cgid disabled, or you just don't have a proper AddHandler set up. It would be nice if the server provided a clue to the issue in the error.log.