in reply to mod-perl configuration under Apache2
i have the same setup as you (Apache2 with mod_perl2 on Ubuntu 6.10) and have no problem running Perl scripts under mod_perl2.
one way to get started is by running Perl scripts using ModPerl::Registry as described in the mod_perl2 documentation. you could take these steps:
(in one terminal) keep an eye on what Apache2 is doing:
sudo tail -f /var/log/apache2/error.log(in another terminal) make sure mod_perl2 is loaded by Apache2:
sudo a2enmod perl /etc/init.d/apache2 restart
create the test directory /var/www/mp2-test and place a simple Perl CGI script there with this content (your posted test CGI script is incorrect and will produce a warning, because it doesn't print a content line):
#!/usr/bin/perl print "Content-type: text/plain\n\n"; print "mod_perl 2.0 rocks!\n";
configure Apache2 to run scripts in /var/www/mp2-test with mod_perl2:
PerlModule ModPerl::Registry <Location "/mp2-test/"> SetHandler perl-script PerlHandler ModPerl::Registry Options +ExecCGI </Location>
also check out the freely available ModPerl Book that covers mod_perl2. and if your still having troubles post back.
. :)))))
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: mod-perl configuration under Apache2
by TOD (Friar) on Mar 07, 2007 at 07:49 UTC | |
|
Re^2: mod-perl configuration under Apache2
by Bruce32903 (Scribe) on Mar 07, 2007 at 17:12 UTC | |
by asz (Pilgrim) on Mar 07, 2007 at 17:52 UTC | |
by Bruce32903 (Scribe) on Mar 07, 2007 at 18:49 UTC | |
by Bruce32903 (Scribe) on Mar 07, 2007 at 17:43 UTC |