How to get localhost/cgi-bin/bugzilla/ to execute/display output of index.cgi ?

Discussion in 'Server Operation' started by rjamesd, Aug 28, 2007.

  1. rjamesd

    rjamesd New Member

    Hi, I'm using webmin on Apache 2.2.3 on Debian 4.0.

    http://localhost/cgi-bin/bugzilla/index.cgi works and runs a script index.cgi in /usr/lib/cgi-bin/bugzilla/index.cgi

    but I want http://localhost/cgi-bin/bugzilla/ to do the same but instead I get


    You don't have permission to access /cgi-bin/bugzilla/ on this server.
    Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/4.4.4-8+etch4 mod_perl/2.0.2 Perl/v5.8.8 Server at rockstar Port 80

    The /var/log/apache2/error.log shows:
    [Tue Aug 28 15:20:26 2007] [error] [client] attempt to invoke directory as script: /usr/lib/cgi-bin/bugzilla/

    My settings in webmin are:
    For Directory /usr/lib/cgi-bin/ on *
    Options ExecCGI Indexes /etc/apache2/apache2.conf (679)
    DirectoryIndex index.cgi /etc/apache2/apache2.conf (680)

    Please advise.
    Last edited: Aug 28, 2007
  2. rjamesd

    rjamesd New Member

    Surely someone else must have wanted a solution to this problem?
  3. rjamesd

    rjamesd New Member

    Fixed it, no thanks to you guys - solution within

    I've fixed it - solution:

    my cgi-bin directory is /usr/lib/cgi-bin so:

    instead of using:

    ScriptAlias /cgi-bin /usr/lib/cgi-bin

    - which gave me the problems, I use this instead

    Alias /cgi-bin /usr/lib/cgi-bin
    <Directory /usr/lib/cgi-bin>
    AddHandler cgi-script cgi pl
    Options ExecCGI

    I got this solution from:

    - took a lot of searching in google to find this.

    I'm using webmin to paste in the above script fragment in manually.

    I hope this puts others out of the misery I had to go through. I'm so pleased!
    ( 403 Forbidden (trying to exec dir as script) but apache config file seems OK)

Share This Page