Re: Another "attempt to invoke directory as script" Error

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

 



Hi,

 

Something like this might work:

<Location /mydir/script.cgi>
  Options ExecCGI
  SetHandler cgi-script
</Location>

You also need "DirectoryIndex script.cgi" in that directory
Look at AddHandler
(http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler) 

To extend CGI to all .cgi files.

  

Regards

Ashutosh



Liyu,She wrote:
> Hi, everyone.
> 
> I am running Apache 2.2.3 on FreeBSD 6.1release.
> I was trying to make the /cgi/ path indexed while visiting.
> More specifically, I want anyone visiting /cgi/ would be
> automatically redirected to /cgi/index.html
> 
> The related configuration part is:
> =========================================
>     Alias /cgi/ "/sly/www/cgi/"
> 
>     <Directory "/sly/www/cgi/">
>         Options Indexes ExecCGI FollowSymLinks
>         AllowOverride None
>         DirectoryIndex index.html
>         Order allow,deny
>         Allow from all
>         SetHandler cgi-script
>     </Directory>
> =========================================
> 
> But I kept knocked off from the /cgi/ location with
>  403 forbidden http status code. It says:
> 
> =========================================
> Forbidden
> 
> You don't have permission to access /cgi/ on this server.
> =========================================
> 
> I check log file and it says:
> 
> =========================================
> [Tue Mar 13 15:24:39 2007] [error] [client 10.10.93.5] attempt to
> invoke directory as script: /sly/www/cgi/
> =========================================
> 
> 
> I don't know why. I've searched a lot on google, but I can't find any
> answer. 
> 
> Could anyone please help me on this?
> 
> Thanks a lot.
> 
> 
> sly
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project. See <URL:http://httpd.apache.org/userslist.html> for more
> info. 
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux