[aklug] Re: Apache2 and Perl

From: Michael Fowler <michael@shoebox.net>
Date: Tue Dec 27 2011 - 10:24:44 AKST

On Tue, Dec 27, 2011 at 08:46:24AM -0900, Damien Hull wrote:
> Here's what I have...
> 1. Ubuntu 10.04
> 2. LAMP
> 3. New installation of Perl in /usr/local/
>
> I have a web app that uses Perl. I'm assuming Apache needs to use the
> same version of Perl. How do I get Apache to talk to this new install
> of Perl?
>
> I tried using the Ubuntu packages but they use the version of Perl
> that came with Ubuntu.

It depends entirely on how exactly you're using Perl, and how Apache is
configured. If you're using mod_perl2 then you would have to recompile
mod_perl2 to point to the new installation.

Using mod_perl is not really recommended unless you specifically need to
tie into Apache's request chain; that in itself is not common. A more
preferred configuration is FastCGI, or a dedicated application server.
With FastCGI you would only need to change the shebang line in the Perl
script to point to your local version of perl. This would also require
rewriting the Perl script to use the FastCGI module, and to do so in a
manner that works, so it may not be a viable alternative.

In other words, it's hard to give you a firm answer without knowing more
about your configuration. Showing us your Apache configuration would
provide the best answers. Knowing how the webapp is written would also
help.

--
Michael Fowler
www.shoebox.net
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Dec 27 15:55:41 2011

This archive was generated by hypermail 2.1.8 : Tue Dec 27 2011 - 15:55:41 AKST