[TriLUG] Apache with mod_perl

Owen Berry oberry at trilug.org
Tue Dec 13 15:01:11 EST 2005


What you're looking for in your Apache config files is something like
this:

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

Thus, you could place your Perl script in /var/www/cgi-bin/ and call it
as http://localhost/cgi-bin/script.pl

Note that this is CGI, which is not the same as mod_perl. Here is a
handy reference if you want to see what mod_perl is:
http://modperlbook.org/index.html. Indeed, the first chapter is
"Introducing CGI and mod_perl".

Owen

On Tue, 2005-12-13 at 14:29 -0500, Corey wrote:
> Hi,
> I am setting up a testing web server on an Averatec 3270 running
> Ubuntu 5.04and Apache 2.  The goal is to use it to test perl scripts
> (just learning) as
> well as php and mysql.  So far I have installed apache, php, mod_perl and
> mysql through apt-get.  The testphp.php script works fine as well as mysql
> but I don't know how to configure apache to run perl scripts.  I don't have
> a cgi bin, or if one is there I don't know where it is.  Could anyone
> instruct me what I would have to do in apache2.conf to execute .pl scripts
> and where i need to put a cgi directory?  http://localhost is directed to
> /var/www/.
> corey




More information about the TriLUG mailing list