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

    Forbidden

    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 127.0.1.1] attempt to invoke directory as script: /usr/lib/cgi-bin/bugzilla/

    My settings in webmin are:
    Directives
    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
    </Directory>

    I got this solution from: http://wiki.apache.org/httpd/DirectoryAsScript

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

    http://www.howtoforge.com/forums/showthread.php?t=15042
    ( 403 Forbidden (trying to exec dir as script) but apache config file seems OK)
     

Share This Page