Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: mod_perl without separate config for static HTML?

by gunzip (Pilgrim)
on Oct 26, 2004 at 13:37 UTC ( [id://402576] : note . print w/replies, xml ) Need Help??


in reply to Re: mod_perl without separate config for static HTML?
in thread mod_perl without separate config for static HTML?

Are you saying that using a mod_perl file extension, eg. .mpl, configured with Apache::Registry will result in static content being handled outside mod_perl? I can mess with httpd.conf to this extent but I'm not in a position to setup separate servers/ports/IPs to separate static HTML requests from mod_perl so your solution may save me from going down the mod_php route. What are the inefficiencies you alluded to?

Are you also saying that configuring a distinct /perl directory for Apache::Registry scripts will leave the static pages to be handled as normal? That's what I normally do anyway?

  • Comment on Re^2: mod_perl without separate config for static HTML?

Replies are listed 'Best First'.
Re^3: mod_perl without separate config for static HTML?
by Mutant (Priest) on Oct 26, 2004 at 13:45 UTC

    Here's a fairly typical Apache::Registry config:

    <Location /cgi/> SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI </Location>

    Now, everything under the 'cgi' dir will be executed under Apache::Registry, and everything else (assuming you don't have other 'Location' etc. directives setup) will just be static.

    You can even use the 'Alias' directive to make the cgi dir outside of your public directories (usually a good idea).

    The ineffeciencies I metentioned just refered to the fact that I was using 'LocationMatch' which might not be necessary for what you're trying to do.

    As someone else mentioned, look at the apache docs and mod_perl docs. Apache/mod_perl config is an art from in itself, and it's definitely something you want to have a handle on if you're worried about performance