httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] AddHandler .cgi & why a.cgi.txt is executed
Date Sat, 18 Dec 2004 19:07:13 GMT
On Sat, 18 Dec 2004 11:57:21 +0100 (CET), Jan Slupski
<jslupski@email.com> wrote:
> 
> Hello,
> 
> Is this normal than when my configuration has (standard) directive:
> 
> AddHandler cgi-script .cgi
> 
> Files that has other extension, but '.cgi' somewhere in filename
> (eg. a.cgi.txt or a.cgi.html) are considered to be cgi scripts as well?

Yes, it is normal and expected.  See:
http://httpd.apache.org/docs-2.0/mod/mod_mime.html#multipleext

On windows we usually think of the extension as the stuff following
the /last/ dot, but on unix, filenames often have multiple extensions
(.tar.gz for example).

Joshua.

> 
> Having this file with chmod 0644 I'm getting following error_log:
> [...] [error] [...] (13)Permission denied: exec of '/home/follow/bin/WWW/a.cgi.txt' failed
> [...] [error] [...] Premature end of script headers: a.cgi.txt
> 
> Having it 0755 its being sucesfully executed as normal cgi.
> 
> If I rename the file to 'a.txt', its contents is displayed (as normal text/plain file).
> 
> I don't think there is anything unusual in my configuration that could affect this.
> 
> Tested on:
> 
> Fedora Core release 3
> httpd-2.0.52-3.1
> 
> Debian GNU/Linux 3.1
> httpd 1.3.31-6
> 
> Thanks,
> Jan Slupski
> 
>   _  _  _  _  _____________________________________________
>   | |_| |\ |  S L U P S K I              jslupski@email.com
> |_| | | | \|                          http://www.juljas.net
> 
> ---------------------------------------------------------------------
> 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
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
>

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


Mime
View raw message