Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

"~" and HTML::Mason and Apache on Snow Leopard

by mboudreau (Acolyte)
on Sep 30, 2009 at 21:32 UTC ( [id://798459]=perlquestion: print w/replies, xml ) Need Help??

mboudreau has asked for the wisdom of the Perl Monks concerning the following question:

I'm setting up a new iMac with Snow Leopard and its default software: Apache 2.2.11, Perl 5.10.0, and mod_perl 2.0.4.

I have installed HTML::Mason and updated the Apache httpd.conf file with the same additions as my previous Mac, where Mason worked perfectly:

PerlModule HTML::Mason::ApacheHandler PerlSetVar MasonDataDir /usr/local/mason PerlAddVar MasonCompRoot "main => /Library/WebServer/Documents" PerlAddVar MasonCompRoot "mrb => /Users/mrb/Sites" <Directory /Users/mrb/Sites/mason/sfmail_new> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler </Directory> AddType text/html .mhtml <LocationMatch "\.mhtml$"> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler </LocationMatch>

And of course I restarted Apache so that it would read the updated httpd.conf file.

Now I find that trying to view http://localhost/~mrb/somefile.mhtml, which should match the 'LocationMatch' directive above, doesn't invoke Mason to handle its content. However, the same file, same filename and extension, accessed at http://localhost/somefile.mhtml, is handled by Mason as it should be.

Has anyone else run across a problem like this?

Replies are listed 'Best First'.
Re: "~" and HTML::Mason and Apache on Snow Leopard
by Joost (Canon) on Sep 30, 2009 at 21:40 UTC
    Now I find that trying to view http://localhost/~mrb/somefile.mhtml, which should match the 'LocationMatch' directive above, doesn't invoke Mason to handle its content.
    What exactly do you mean by this? Is that location not accessible at all (i.e. 404 or equivalent error) or do you get unparsed/processed .mhtml output?

    If it's the first, check you've got the correct mod_userdir directives configured. If it's the second, or something else, I don't really know what the problem would be. Anything useful in the apache error logs when you access the file or when you start apache?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-25 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found