mod_perl questions (was Can't start Apache)
Wes Plate
yellowdog-newbie@lists.terrasoftsolutions.com
Tue, 05 Aug 2003 11:56:40 -0700
On 8/5/03 11:34 AM, "Longman, Bill" wrote:
>> I don't see anything about mod_perl in my httpd.conf file,
>> shouldn't there
>> be?
>
> It's probably being included. Look in the conf.d directory for other conf
> files. There's almost always a perl.conf.
>
> BTW, the perl interpreter for Apache is a module, so you don't necessarily
> need to install all the pm's that you had to do with the CGI forked-perl
> setup of yore.
I ask about this in the httpd.conf file because the install directions I'm
following say:
> *)
> With mod_perl (speed!):
> =======================
> Add this to the mod_perl stuff section in httpd.conf
> [...]
> Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
> Alias /otrs/ "/opt/otrs/bin/cgi-bin/"
>
> <Location /otrs>
> SetHandler perl-script
> PerlHandler Apache::Registry
> Options ExecCGI
> PerlSendHeader On
> </Location>
So can I add this stuff ANYWHERE in the httpd.conf file?
Or should I add it to perl.conf?
Next, I need to add something to my httpd.conf file, should this stuff go
into perl.conf?
Perl.conf doesn't have anything about a startup script. So I'm worried
about what to do here.
> You may want to use a mod_perl startup script. Compiled modules on startup
> (speed!)! Use the mod_perl startup script which comes with otrs
> (scripts/apache-perl-startup.pl).
>
> - Change the default startup script location of your httpd to
> $OTRS_HOME/scripts/apache-perl-startup.pl in httpd.conf
> [...]
> # load all otrs modules
> Perlrequire /opt/otrs/scripts/apache-perl-startup.pl
> [...]
>
> Edit the scripts/apache-perl-startup.pl script:
>
> - Establish datababase connections on process startup (httpd).
>
> [...]
> use Apache ();
> use Apache::DBI ();
> Apache::DBI->connect_on_init('DBI:mysql:otrs', 'otrs', 'some-pass');
> # Apache::DBI->connect_on_init($data_source, $username, $auth, \%attr)
> [...]
>
> - Change the otrs lib dir (if needed)!
>
> [...]
> # --
> # set otrs lib path!
> # --
> use lib "/path/to/otrs/";
> use lib "/path/to/otrs/Kernel/cpan-lib";
> [...]
>
> Nice! You will love mod_perl! ,-)
>
> PS: If you use mod_perl2 use the scripts/apache2-* scripts!
--
Wes Plate
Automatic Duck, Inc.
http://www.wesplate.com
http://www.automaticduck.com