apache 2 and cgi not working
Hi People. I'm trying to migrate from Apache 1.3 to Apache 2. I
cannot get any of my perl-dbi cgi scripts to work. For example, I
have a file called test.cgi, which is kind of like a "hello world"
thing. That script and many others run fine on another deb-box
running Apache 1.3 but I can't get it to work on my Apache 2
configuration.
The Apache 2 box I have processes html files fine, so I know that
Apache is basically working, I just can't get cgi with perl to work.
I can get the perl files to execute from the shell or console; just
not with Apache 2.
I've searched the web and done all I can to get it to work, could
someone help?
I'm on a Sid box.
I am using the apache2.conf file in /etc/apache2 that comes with
apt-get procedure. I have uncommented a line that reads
AddHandler cgi-script .cgi
found in apache2.conf.
I read the README in /etc/apache2/ and see that I can include
additional directives by putting script files in /etc/apache2/conf.d
. Which is what I've done.
Here is the contents of my script file living in /etc/apache2/conf.d
with the extra directives I believe I need to get cgi working.
****BEGIN SCRIPT FILE*****
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/">
Options FollowSymLinks +ExecCGI
AllowOverride None
</Directory>
<Directory "/var/www/">
Options Indexes Includes FollowSymLinks +ExecCGI
AllowOverride None
Allow from All
Order allow,deny
</Directory>
******END SCRIPT FILE*******
I know the above script is indeed being read because I've
intentionally broken it to test this idea and sure enough Apache
won't start with it broken.
In the directory /etc/apache2/mods-enabled I have the following
links to /etc/apache2/mods-available....
cgi.load cgid.load perl.load userdir.load
cgid.conf perl.conf userdir.conf
It's not a permission problem; the permissons on the cgi files are
0755.
I get this error message posted to html from Apache:
"Forbidden
You don't have permission to access /test.cgi on this server."
And then from /var/log/apache2/error.log I get:
"....Options ExecCGI is off in this directory: /var/www/test.cgi"
So what don't I understand?
--
<Eric Cheney> cheney@soc.umass.edu http://sociostat.org/~eric/
Reply to: