Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

ubuntu 10.04 mod_perl apache registry starter?

by iaw4 (Monk)
on Oct 05, 2010 at 22:25 UTC ( #863695=perlquestion: print w/replies, xml ) Need Help??
iaw4 has asked for the wisdom of the Perl Monks concerning the following question:

Dear Perl Monks:

I have a simple CGI perl script, which I want to convert into a mod_perl script for faster speed under ubuntu 10.04 (presumably, among the most popular distributions). that's it. reading around the web, I probably want something simple, like Apache::Registry. (Not sure why it is simple...just read it was.)

Does anyone know of a good primer? I started with

apt-get install libapache2-mod-perl2 libapache2-mod-perl2-dev libapac +he2-mod-perl2-doc perl-doc
then installed Apache::Registry,
# cpan > get Apache::Registry
then added inside my VirtualHost the following lines:
Alias /perl-bin/ /usr/local/perl-bin/ <Location /perl-bin> SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On Options ExecCGI </Location>
and I mkdir'ed /usr/local/bin/perl-bin/ . alas, even after a restart of the apache2 server, I get
# apache2ctl -l Compiled in modules: core.c mod_log_config.c mod_logio.c prefork.c http_core.c mod_so.c

so, no mod_perl that I can see so far. what I have done sofar is all guesswork, of course. I need a step-by-step guide. I did not find one with google. has anyone written such a thing?

Advice, as always, appreciated.

Replies are listed 'Best First'.
Re: ubuntu 10.04 mod_perl apache registry starter?
by jau (Hermit) on Oct 06, 2010 at 07:17 UTC

    To show all loaded modules use:

    apache2ctl -M

    If perl_module has not been loaded, add the following line to your httpd.conf and restart Apache:

    LoadModule perl_module modules/

    Documentation, tutorials, etc. can be found on

      thank you, gentlemen. I did not know about fastcgi, but this was very easy to get going, so I am using fastcgi now.
Re: ubuntu 10.04 mod_perl apache registry starter?
by sundialsvc4 (Abbot) on Oct 06, 2010 at 03:15 UTC

    There are numerous documents out there about mod_perl, and other technologies such as FastCGI.   Probably even a cookbook.

    However, I would observe that “good ol’ CGI” can go a long way when used with a well-tuned server and a judicious mix of dynamic vs. static (cached...) content.   The transition from this environment to other alternatives is not quite a non-trivial task.   I suggest that you consider your existing application very carefully before concluding that it “must” be converted to another form of deployment.   It ain’t necessarily so...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://863695]
Approved by ww
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2018-05-26 20:12 GMT
Find Nodes?
    Voting Booth?