Koozali.org: home of the SME Server

mod_perl

cc_skavenger

mod_perl
« on: October 13, 2003, 11:42:09 AM »
Hello all,

If I install mod_perl on my system, do I have to create aliases for all my virtual domains?

Greg Zartman

Re: mod_perl
« Reply #1 on: October 13, 2003, 10:46:03 PM »
> If I install mod_perl on my system, do I have to create
> aliases for all my virtual domains?

Mod_perl is installed on a stock SME box, it is simply shut-off.   Did you activate it using:

http://mirror.contribs.org/smeserver/contribs/gzartman/HowToGuides/mod_perl-howto.htm

If so, then there are instructions to adding a mod_perl alias to an ibay.

Greg Zartman

marco

Re: mod_perl
« Reply #2 on: October 14, 2003, 12:48:28 AM »
Thanks Greg,

I did read your howto, but I was not sure if it had to be done for all the i-bays.

thanks

Greg Zartman

Re: mod_perl
« Reply #3 on: October 14, 2003, 01:14:38 AM »
> I did read your howto, but I was not sure if it had to be
> done for all the i-bays.

Yes, you need to do it for each ibay that you'd like to take advantage of mod_perl.  The example I present in the howto shows the steps to add mod_perl capabilities to the primary ibay.  

Greg

Greg Zartman

Re: mod_perl
« Reply #4 on: October 14, 2003, 01:38:12 AM »
I think I should clarify a little further on my previous post.   When you activate mod_perl on you SME box, Apache is running it system wide.  Depending how you want to utilize mod_perl, you may need to configure apache further.

 In a nutshell, mod_perl gives the developer the ability to both write apache modules in perl and cache perl scripts in memory as compiled code and them run them.   Writing perl apache modules is essentially expanding the capabilities of apache (i.e, your perl code becomes in intergral part of the apache webserver).  This is kind of the default setting for mod_perl and doesn't require any further configuration beyond activating mod_perl.  

Running perl code under mod_perl as a cached scripts is a kind of a turbo charged CGI.  This method of utilizing mod_perl requires that you make another "cgi-bin," so to speak, to store your mod_perl code (e.g., modperl-bin)   When code is placed in the modperl-bin and then accessed,  apache compiles it and keeps it in memory.  This really speeds things up as after the first compile, all apache needs to do is run the compiled code from memory next time the script is accessed.  The downside of cached scripts is they tend to be more resource intensive than mod_cgi scripts (i.e., standard cgi scripts) and require a more structured approach to develpment.  If you make a mistake in your code or don't watch variable scoping, you can tank your web server.

Greg Zartman

cc_skavenger

Re: mod_perl
« Reply #5 on: October 14, 2003, 10:20:55 AM »
Now I really understand!
Thanks for explaining!

Italo

Re: mod_perl
« Reply #6 on: December 29, 2003, 11:02:33 PM »
Hi Greg,

I hope you still read this thread. Does your how-to on mod_perl works for e-smith version 6 or only for 5.x?

Thanx,
Italo