>>>>> "ebay" == ebay <Jeff> writes:
ebay> I am setting up a server so that all my scripts have .cgi extentions.
ebay> It would be nice if I could just add some directives in the httpd.conf
ebay> that will have all my virtual hosts use modPerl for any files with
ebay> either a .pl or a .cgi extention. The reason I prefer this method is
ebay> that I have a couple scripts that I load in my httpdocs directory (the
ebay> site home page is a script) So this is what I did:
ebay> Commented out: AddHandler cgi-script .cgi
ebay> Added the following:
ebay> <IfModule mod_perl.c>
ebay> <Files ~ (\.pl|\.cgi)>
ebay> SetHandler perl-script
ebay> PerlHandler Apache::PerlRun
ebay> Options +ExecCGI
ebay> allow from all
ebay> PerlSendHeader On
ebay> </Files>
ebay> </IfModule>
try FilesMatch instead and see if that works
ebay> What I found is that when I only had this code only outside of the
ebay> VirtualHost configurations, my test script indicated .pl was running in
ebay> modPerl but .cgi wasn't. I only could get .cgi to run in mod_Perl by
ebay> copying this code inside of each of the VirtualHost configurations.
ebay> Obviously I'm not an Apache config expert but one thing that also struck
ebay> me strange is that while this code clearly indicates how to handle .pl
ebay> and .cgi file extentions, prior to adding this, I could not find
ebay> anywhere in httpd.conf where it maps .cgi files in this same way. The
ebay> only code I could find is AddHandler cgi-script .cgi but shouldn't there
ebay> be some additional corresponding code like PerlHandler Appache::Mod_CGI,
ebay> Options +ExecCGI, etc.?? Also, how does appache know which module to
ebay> use for ScriptAlias directories? I left the ScriptAlias directives in
ebay> for the cgi-bin director and didn't change them to just Alias directives
ebay> and it works fine but I guess that means a filematch directive overrides
ebay> a ScriptAlias directive?
ebay> A bit confused. Anyway, is the above method for achieving what I want
ebay> an acceptable and secure/safe way to handle it?
ebay> Thanks
--
XEmacs Advocate | I've seen things you people wouldnt believe.
FreeBSD Devote | Attack ships on fire of the shores of orion ...
Perl Hacker | All those moments will be lost in time,
Apache God | like tears in the rain. Time to die.. roy batty - bladerunner