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.
. :)))))In reply to Re: mod-perl configuration under Apache2
by asz
in thread mod-perl configuration under Apache2
by Bruce32903
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |