Apache/CentOS--error: attempt to invoke directory as script. Please help.
581674Nov 12 2007 — edited Nov 13 2007I am running CentOS 4.5 with kernel 2.6.9-55.EL and Apache 2.0.52.
When I am typing http://linxdell.systems.com to execute index.cgi, I am getting:
Forbidden
You don't have permission to access / on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request
In the error_log I found:
attempt to invoke directory as script: /var/www/htdocs/
But if I type http://linxdell.systems.com/index.cgi, it works fine.
Below is some of my httpd.conf:
DocumentRoot "/var/www/htdocs"
<Directory />
Options FollowSymLinks ExecCGI Indexes
AllowOverride All
</Directory>
<Directory "/var/www/htdocs">
Options Indexes FollowSymLinks All Multiviews ExecCGI
SetHandler cgi-script
AllowOverride All
Order allow,deny
Allow from all
</Directory>
DirectoryIndex generate_page.pl index.html index.htm index.cgi
ScriptAlias /cgi-bin "/var/www/cgi-bin" (also tried with Alias)
<Directory "/var/www/cgi-bin">
AllowOverride All
SetHandler cgi-script
Options ExecCGI Indexes
Allow from all
</Directory>
I will really appreciate any help to solve this problem.
Thanks.