You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by jason <ja...@welsh.dynip.com> on 2000/10/14 19:51:07 UTC

newbie needin help

Hey folks,

I have apache_1.3.12 running on freebsd 4.1 and I have an application
that I want to run with mod_perl. Ususally I take the easy way out and
run my perl cgi's with speedycgi. I believe it operates (or I may be
totally wrong) in the same fashion as mod_perl except that its a lot
easier to implement. Anyway, the script im trying to use is web-ftp
(www.web-ftp.org) and of course because it relies on perl a lot, its
horribly slow. I want to try to get it to work with mod_perl and have
read through the http://perl.apache.org/tuning/ but am still not sure
what the basic commands I need in my httpd.conf are. It looks like I
need a separate directory to store cgi's that I want to run mod_perl'd
but im not sure. 

What I have gathered is that I need to 
1. put this in my httpd.conf
 # put mod_perl programs here
 # startup.perl loads all functions that we want to use within mod_perl
 Perlrequire /usr/local/apache/perl/startup.perl
 <Directory /usr/local/apahce/cgi-bin/webftp>
   AllowOverride None
   Options ExecCGI
   SetHandler perl-script
   PerlHandler Apache::Registry
   PerlSendHeader On
 </Directory>

2. then create a file called startup.perl in /usr/local/apache/perl/

I assume this is the startup.perl file

 #! /usr/local/bin/perl
 use strict;
 
 # load up necessary perl function modules to be able to call from
Perl-SSI
 # files.  These objects are reloaded upon server restart (SIGHUP or
SIGUSR1)
 # if PerlFreshRestart is "On" in httpd.conf (as of mod_perl 1.03).
 
 # only library-type routines should go in this directory.
 
 use lib "/usr/local/apache/perl";
 
 # make sure we are in a sane environment.
 $ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die "GATEWAY_INTERFACE not
Perl!";
 
 use Apache::Registry ();       # for things in the "/programs" URL
 
 # pull in things we will use in most requests so it is read and
compiled
 # exactly once
 use CGI (); CGI->compile(':all');
 use CGI::Carp ();
 use DBI ();
 use DBD::mysql ();

 1;


and is this it? do I have to modify my webftp.cgi program in any way?

regards,
Jason