1

I am settings up Bugzilla for the first time, and I've been getting this error:

TEST-FAILED Webserver is fetching rather than executing CGI files.
Check the AddHandler statement in your httpd.conf file.

I've searched a lot of different threads, but nothing helped. The AddHandler statement seems correct. Here is my apache2.conf.

ScriptAlias /bugzilla/ /var/www/html/bugzilla/
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes Options
</Directory>

I followed this tutorial: https://bugzilla.readthedocs.org/en/5.0/installing/linux.html I am stuck on 3.2.9, where ./testserver.pl results in the error above.

Tyler Montney
  • 201
  • 2
  • 8

2 Answers2

3

Something that was never mentioned in any tutorial, or any of my searches was enabling the CGI module.

sudo a2enmod cgi
sudo service apache2 restart

For reference, here is my apache2.conf:

Alias /bugzilla/ /var/www/html/bugzilla/
<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes Options
</Directory>

Source: https://askubuntu.com/questions/54251/how-do-i-make-apache-run-a-cgi-instead-of-showing-the-text

Tyler Montney
  • 201
  • 2
  • 8
  • http://bugzilla.readthedocs.org/en/latest/installing/linux.html says: "The default Bugzilla distribution is NOT designed to be placed in a cgi-bin directory. This includes any directory which is configured using the ScriptAlias directive of Apache." So just to confirm, ScriptAlias is not the way forward :-) – Gervase Markham Jul 14 '15 at 10:24
  • I've filed https://bugzilla.mozilla.org/show_bug.cgi?id=1183571 on adding "a2enmod cgi" to the docs. – Gervase Markham Jul 14 '15 at 10:24
  • HBruijn suggested ScriptAlias. – Tyler Montney Jul 14 '15 at 20:37
  • a2enmod cgi. Ficed it immediately. Everything else was properly configured. Except that piece. – Ken Ingram Sep 12 '18 at 21:03
1

On mobile so a bit brief, but rather than an Alias directive try ScriptAlias for CGI.

HBruijn
  • 77,029
  • 24
  • 135
  • 201