If you want to block access to .mas and your other handlers with Apache2
you can using something like this:
PerlModule Apache2::Const
<FilesMatch "(\.mas|dhandler|autohandler)$">
SetHandler perl-script
PerlInitHandler Apache2::Const::NOT_FOUND
</FilesMatch>
Hope that helps.
Regards,
Bradley C Bailey
> That did the trick for the first one. I love you all! :)
>
> Any takers on the second part?
>
> Jimbus
>
>
>
>> ----- Original Message -----
>> From: "Kris Yates" <[EMAIL PROTECTED]>
>> To: "Jim Babcock" <[EMAIL PROTECTED]>, [email protected]
>> Subject: Re: [Mason] newbie question: no closing %>
>> Date: Tue, 28 Feb 2006 15:14:32 -0600
>>
>>
>> Line 21 should be </%method> instead of <%/method>
>>
>> HTH,
>> Kris
>> Message from Kris Yates [EMAIL PROTECTED] Automated Data Backup
>> http://www.worldspice.net/services/offsitedatabackup.html
>> ----- Original Message -----
>> From: "Jim Babcock" <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Tuesday, February 28, 2006 2:55 PM
>> Subject: [Mason] newbie question: no closing %>
>>
>>
>> I'm running the latest apache(2.2), mod_perl(2.02) and mason (1.32) and
>> I'm
>> having two issues while I'm trying to follow the example from the mason
>> book
>> (chap 8, apprentice.perl.org):
>>
>> <html>
>> <head>
>> <link rel="stylesheet" type="text/css" href="/resources/css/index.css"
>> />
>>
>> <title>NEOps: <& SELF:title &></title>
>> </head>
>>
>> <body>
>> <& header.html, %ARGS &>
>> <& menu.html, %ARGS &>
>> <& footer.html &>
>>
>> % $m->call_next;
>>
>>
>> </body>
>> </html>
>>
>> <%method title>
>> Network Engineering and Operations
>> <%/method>
>>
>> gives me the error message:
>>
>> error: '<%' without matching '%>' at /usr/local/www/docs/autohandler
>> line
>> 21
>> context: ...
>> 17: </html>
>> 18:
>> 19: <%method title>
>> 20: Network Engineering and Operations
>> 21: <%/method>
>> 22:
>>
>> code stack:
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Lexer.pm:402
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Lexer.pm:125
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Lexer.pm:355
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Lexer.pm:123
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Lexer.pm:99
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Compiler.pm:214
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Compiler/ToObject.pm:75
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Compiler/ToObject.pm:114
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Interp.pm:435
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Interp.pm:767
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Component.pm:333
>> /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm:422
>>
>> My config is:
>>
>> <Directory />
>> Options FollowSymLinks
>> AllowOverride None
>> Order deny,allow
>> Deny from all
>> </Directory>
>>
>> #
>> # Note that from this point forward you must specifically allow
>> # particular features to be enabled - so if something's not working as
>> # you might expect, make sure that you have specifically enabled it
>> # below.
>> #
>>
>> #
>> # This should be changed to whatever you set DocumentRoot to.
>> #
>>
>> PerlRequire /usr/local/www/cgi/lib/uses.pl
>> PerlSwitches -wT
>>
>> PerlSetVar MasonCompRoot /usr/local/www/docs
>> PerlSetVar MasonDataDir /usr/local/httpd/mason
>>
>> PerlSetVar MasonAllowGlobals $Schema
>> PerlSetVar MasonAllowGlobals $User
>>
>> PerlModule HTML::Mason::ApacheHandler
>> PerlModule CGI
>>
>> #PerlModule Apache::Const qw(NOT_FOUND)
>>
>> <FilesMatch "(\.html|\.css)$">
>> SetHandler perl-script
>> PerlHandler HTML::Mason::ApacheHandler
>> </FilesMatch>
>>
>> <Directory "/usr/local/www/docs">
>>
>> My second question has to do with the commented out section of the
>> config. I
>> was trying to duplite the book's config for blocking direct access to
>> non-top level components, but the was an issue with the
>> Apache::Constants
>> module being 1.x only and I can't figure out how to do this for 2.x
>> apache.
>>
>> Thanks,
>>
>> Jimbus
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users