httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valerio Pachera" <siri...@gmail.com>
Subject Re: [users@httpd] Re: Generic questions about apache configuration
Date Fri, 22 Aug 2008 13:43:15 GMT
2008/8/22 Eric Covener <covener@gmail.com>:
>> Why in the second case "SetHandleer" is used instead of "Addhandler" ?
>
> Because the second option already has a cgi-bin/ subdirectory on the
> URL -- so everyhting should be treated as CGI not just certain files.

Ok, by your answer and re-reading the documentation I cleared that
Sethandler is used for
directive <Directory> and <Lcation> and it DOESN'T LOOK at file extension.

By the other hand, with Add handler you associate a handler to files
with certains extension
(Syntax:	AddHandler handler-name extension [extension] ...)

In a forum I found this directive.

   <Files "*.rhtml">
      SetHandler ruby-object
      RubyHandler Apache::ERubyRun.instance
      Options +ExecCGI
   </Files>

As we can see SetHandler is used inside <file> directive! The
documentation says it can be used only in <directory> and <location>
section!
But this seems the best way if I want to execute all .rhtml file in
the DocumentRoot. Isn't it?

Reference Documentation:
http://httpd.apache.org/docs/2.2/mod/core.html#sethandler
http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler
http://httpd.apache.org/docs/2.2/mod/core.html#files

---------------------------------------------------------------------
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