Rabimba Karanjai
Rabimba Karanjai

Reputation: 196

"Webserver is fetching rather than executing CGI files" When trying to run Bugzilla

Disclaimer: I know this questions sounds lame. But I am no n00b and I have done whatever I know and I could find help about this. I have already searched the forum for this and tried all the fixes given but none of them helped me hence this question.

The threads I have visited

Now with that

My Exact problem

I have installed bugzilla on a bitnamil lampstack. The lampstack already has two other applications up and running successfully. After my bugzilla installation when I am trying to visit the page I can see my whole perl script on the borwser. Running it's own server check reveals me the following

TEST-OK Webserver is running under group id in $webservergroup.

TEST-OK Got padlock picture.

TEST-FAILED Webserver is fetching rather than executing CGI files.

What I have done in my setup

  1. The bugzilla.conf file (which gets pulled in httpd.conf) has the following settings enabled

    > AddHandler cgi-script .cgi .pl
    >
    >    Options +MultiViews +ExecCGI
    >
    >    DirectoryIndex index.cgi
    >
    >    AllowOverride All
    
  2. The "AddHandler cgi-script .cgi .pl" is already enabled in my httpd.conf file.

  3. I have not enabled separately +ExecCGI for all directories in httpd.conf but even that does not solve the problem

What am I doing wrong here?

Upvotes: 3

Views: 5338

Answers (3)

MakeBigNews
MakeBigNews

Reputation: 21

yellavon's answer solved my problem: cgi script is not executing

Here's a copy of his answer:

Make sure you are loading the CGI module in the httpd.conf file: LoadModule cgi_module modules/mod_cgi.so or LoadModule cgi_module modules/mod_cgid.so depending on which version of Apache you are running. You can also read about additional solutions for Dynamic Content with CGI.

Upvotes: 1

steelbox
steelbox

Reputation: 11

I had a similar problem with another package downloading the CGI files instead of executing them on the server. The answer to my problem was that on Ubuntu server 14.04, the module CGI on apache was disabled. To fix:

sudo a2enmod cgi 

sudo service apache2 restart

To check if the module is loaded, on Ubuntu:

apache2ctl -M | grep cgi
 cgi_module (shared)

Upvotes: 1

Gavin S
Gavin S

Reputation: 738

You should have a directory block in your bugzilla.conf that looks something like this:

<Directory "/usr/local/apache2/htdocs/bugzilla">
    AddHandler cgi-script .cgi
    Options +ExecCGI +FollowSymLinks
    DirectoryIndex index.cgi index.html
    AllowOverride Limit FileInfo Indexes Options
    AddType application/vnd.mozilla.xul+xml .xul
    AddType application/rdf+xml .rdf
</Directory>

I believe you don't want the .pl to be 'handled'. And having All for AllowOverride is a security issue. The FollowSymLinks one is because my bugzilla directory in htdocs is a symlink to somewhere else on the system.

Did you run the checksetup.pl? It should have adjusted all the permissions for you, but check to see that the group that your web server runs as has read and execute permissions.

Upvotes: 2

Related Questions