Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: mod_perl and HTTP::Mason acting funky

by mreece (Friar)
on Aug 29, 2006 at 20:52 UTC ( [id://570250]=note: print w/replies, xml ) Need Help??


in reply to mod_perl and HTTP::Mason acting funky

1. see Allowing Directory Requests in the mason administrators manual. you'll probably want something like PerlSetVar MasonDeclineDirs 0 in your Location segment.

2. your images are being served by mason, and are probably coming with the leading part of the HTML from the autohandler (or similar, depending on your setup.)

consider using a <LocationMatch ...> instead:

<LocationMatch "\.html$"> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler PerlSetVar MasonDeclineDirs 0 </LocationMarch> <LocationMatch "(\.m(html|txt|pl)?|dhandler|autohandler)/?$"> SetHandler perl-script PerlInitHandler Apache::Constants::NOT_FOUND PerlSetVar MasonDeclineDirs 0 </LocationMatch>
see Controlling Access via Filename Extension

Replies are listed 'Best First'.
Re^2: mod_perl and HTTP::Mason acting funky
by Anonymous Monk on Aug 30, 2006 at 12:59 UTC
    That was really useful, but i couldn't seem to find any documentation about using a location match using sub directorys, eg "/dir/dir/\.html" but that wont work. Any ideas? / This is not really perl at all is it :P /
      LocationMatch uses regex, so you would want something like <LocationMatch "/dir/dir/[^/]*\.html$"> (/dir/dir/*.html only) or <Location Match "/dir/dir/.*\.html$"> (any *.html below /dir/dir/)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://570250]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2024-04-24 09:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found