You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Wright <st...@cwazy.co.uk> on 2002/01/14 18:09:24 UTC

mod_mime_magic reading cgi file, why ?

Hello,

I found a line very like this in my apache error_log;

[Mon Jan 14 15:39:42 2002] [error] [client xxx.xxx.xxx.xxx] (13)Permission 
denied: mod_mime_magic: can't read 
`/home/sites/www.mywebsite.com/cgi-local/mycgi.pl'

It was cause by mod_mime_magic not being able to read mycgi.pl, this was due 
to file permisions. 
However can anyone tell me why mod_mime_magic should be reading a cgi file ??

Thanks,
Steve.

---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: mod_mime_magic reading cgi file, why ?

Posted by Steve Wright <st...@cwazy.co.uk>.
Yes, I believe so, my understanding of the apache manual was if am using 
mod_cgi & the file is in a ScriptAlias directory (which it is) it would 
acquire the mimetype "application/x-httpd-cgi" & execute as a cgi file.

mycgi.pl does execute correctly & the results are returned.

I have noticed if I add a directory directive for /cgi-local/ & specify 
"AddType application/x-httpd-cgi .cgi .pl" the error message in my logs 
disappears.

Now I am confused, the mod_cgi manual says 
"Any file that has the mime type application/x-httpd-cgi or handler 
cgi-script (Apache 1.1 or later) will be treated as a CGI script, and run by 
the server", it also says
"Files acquire this type either by having a name containing an extension 
defined by the AddType directive, or by being in a ScriptAlias  directory"

My file is in a ScriptAlias directory, why do I need to define the AddType 
directive ?
Is something perhaps in the wrong order, eg checking mimetypes with mod_mime 
& mod_mime_magic before associating the mimetype acquired by being in a 
ScriptAlias directory ?
Have I missed something ? Perhaps someone could point me to a manual page.

Thanks
Steve.
====
From: "Joshua Slive" <jo...@slive.ca>
> Is the server properly configured to execute mycgi.pl as a cgi script?
>
> Joshua.

====
From: stevew@cwazy.co.uk
> >
> >
> > I found a line very like this in my apache error_log;
> >
> > [Mon Jan 14 15:39:42 2002] [error] [client xxx.xxx.xxx.xxx]
> > (13)Permission
> > denied: mod_mime_magic: can't read
> > `/home/sites/www.mywebsite.com/cgi-local/mycgi.pl'
> >
> > It was cause by mod_mime_magic not being able to read mycgi.pl,
> > this was due
> > to file permisions.
> > However can anyone tell me why mod_mime_magic should be reading a
> > cgi file ??

---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: mod_mime_magic reading cgi file, why ?

Posted by Joshua Slive <jo...@slive.ca>.
> From: Steve Wright [mailto:stevew@cwazy.co.uk]

> 
> I found a line very like this in my apache error_log;
> 
> [Mon Jan 14 15:39:42 2002] [error] [client xxx.xxx.xxx.xxx] 
> (13)Permission 
> denied: mod_mime_magic: can't read 
> `/home/sites/www.mywebsite.com/cgi-local/mycgi.pl'
> 
> It was cause by mod_mime_magic not being able to read mycgi.pl, 
> this was due 
> to file permisions. 
> However can anyone tell me why mod_mime_magic should be reading a 
> cgi file ??

Is the server properly configured to execute mycgi.pl as a cgi script?

Joshua.

---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org