Oops, I forgot to send my response to the list. This solved his problem. Bradley C Bailey
---------------------------- Original Message ---------------------------- Subject: Re: [Mason] Access control to .mas, *handler files From: "Bradley C Bailey" <[EMAIL PROTECTED]> Date: Wed, November 21, 2007 11:03 pm To: "Raymond Wan" <[EMAIL PROTECTED]> -------------------------------------------------------------------------- Ray, I have used both methods successfully in Apache 2.x. I would check your error_log, but I suspect that you have not loaded Apache2::Const. In my startup.pl file I have: use Apache2::Const -compile => ':common'; You could also do that in a <Perl> block. PerlHandler was mod_perl 1.x syntax, for 2.x you would want to use the PerlInitHandler as it is earlier on in the request cycle. Hope that helps, Bradley C Bailey > Hi all, > > I guess this is a modperl problem, but I am sure many Mason users have > added this configuration which I saw for Apache (1.x) in the Mason > book. If I don't want other people to see my .mas and *handler files > in Apache 2, and adapting the example from Apache 1 with some web > searching led me to either: > > <FilesMatch "(\.mas|dhandler|autohandler|syshandler)$"> > SetHandler perl-script > PerlInitHandler Apache2::Const::NOT_FOUND > </FilesMatch> > > <FilesMatch "(\.mas|dhandler|autohandler|syshandler)$"> > Order allow,deny > Deny from all > </FilesMatch> > > The second one says "access denied" but the first one is giving me an > "Internal Server Error". Result code 500? Is there some configuration > that I have done wrong? The relevant lines from my httpd.conf are: > > PerlModule HTML::Mason::ApacheHandler > PerlModule Apache2::Const > PerlSetVar MasonArgsMethod 'mod_perl' > > The Mason book uses "PerlHandler"; I've tried both and both give me the > same error. This isn't very serious as it obviously has prevented > prying eyes...but if I want to use the first option (which I prefer), > this could lead to e-mails from users telling me of an Internal Server > Error which I should correct... > > Thank you! > > Ray ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users