[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

cgi-bin stopped working in apache ?! please help



This is really baffling because CGI was working last week and now when
I try it again and it is not working.

All I did was add a name based virtual host in
/etc/apache2/sites-enabled/ and /etc/apache2/sites-available/

I am running  apache2-mpm-prefork version 2.2.9-7 on Debian lenny/sid.

/usr/lib/cgi-bin/ has darcs.cgi, darcsweb.cgi and awstats.pl

Previously to access one of these I would do:
http://www.jesujuva.org/cgi-bin/darcsweb.cgi

But now when I do that I get this file not found error:

404 Not Found

The requested URL /cgi-bin/darcsweb.cgi was not found on this server.
Apache/2.2.9 (Debian) PHP/5.2.6-3 with Suhosin-Patch Server at
www.jesujuva.org Port 80

It is clearly there so why is it saying not found? Argh this is so frustrating.

/etc/apache2/sites-available/default has:

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

/etc/apach2/mods-enabled/cgi.load has:
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so

ls shows this module exists:
-rw-r--r-- 1 root root 20256 2008-08-08 13:39
/usr/lib/apache2/modules/mod_cgi.so

/etc/apache2/mods-available/cgid.conf has:
# Socket for cgid communication
ScriptSock /var/run/apache2/cgisock

/etc/apache2/conf.d/darcsweb.conf has:
        Alias /darcs /var/www/darcs

        Alias /darcsweb /usr/share/darcsweb
        <Directory "/usr/share/darcsweb">
                AllowOverride None
                Options None
                Order allow,deny
                Allow from all
                RedirectMatch ^/darcsweb$ /cgi-bin/darcsweb.cgi
        </Directory>

I don't see why it worked last week and now it doesn't. I didn't
upgrade apache2, I didn't edit any of the config files except adding a
named based virtual host which I did by creating
/etc/apache2/sites-available/darcs which has:
<VirtualHost *:80>
       ServerName darcs.jesujuva.org
       ServerAlias jesujuva.org www.jesujuva.org darcs.jesujuva.org
       DocumentRoot /var/www/darcs
</VirtualHost>

And creating a symlink to that named darcs in /etc/apache2/sites-enabled

So why is CGI not working and how can I fix it?

I get the same "404 Not Found" error if I try other programs in
/usr/lib/cgi-bin such as darcs.cgi or awstats.pl

Zach


Reply to: