View Full Version : Has anyone installed mod_perl
erehwon
06-20-2008, 05:25 AM
...and had it work successfully with the stock 1.3.29 Apache?
Like so?
Alias /perl/ /home/httpd/perl/
PerlModule Apache::Registry
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
allow from all
PerlSendHeader On
</Location>
jggimi
06-20-2008, 12:31 PM
...and had it work successfully with the stock 1.3.29 Apache?No, I've never used that particular application, but I'm replying because you might find FAQ 10.16 is applicable to your situation.
erehwon
06-21-2008, 12:49 AM
No, I've never used that particular application, but I'm replying because you might find FAQ 10.16 is applicable to your situation.
Thanks; I have been able to get cgi-bin scripts to run (using mod_cgi of course) and have copied over Perl and required libraries so that I do not need to use httpd -u, but to no avail yet.
ai-danno
06-22-2008, 07:41 PM
Have you been able to run a simple perl script (blah.pl) from /var/www/cgi-bin ? I realize you say you have using mod_cgi, but I got this following script running with just the vanilla install of mod_perl... am I missing something from your description?
I did the following-
# pkg_add mod_perl-1.30p1
# apachectl stop
# /usr/local/sbin/mod_perl-enable
# apachectl start
# cd /var/www/cgi-bin/
# nano mp-rules.pl
Then... here's the contents of mp-rules.pl
#!/usr/bin/perl
print "Content-type: text/plain\r\n\r\n";
print "mod_perl rules!\n";
Then... back at the command prompt...
# chmod 777 mp-rules.pl
... And finally loaded http://myserverip.domain/cgi-bin/mp-rules.pl (http://myserverip.domain/mp-rules.pl) in my browser and it worked.
Are you not getting the same love?
erehwon
06-23-2008, 05:29 PM
Have you been able to run a simple perl script (blah.pl) from /var/www/cgi-bin ?
Haven't tried that; I created my own modperl directory, assuming that anything in the cgi-bin would automatically be processed by mod_cgi with no choice. When I use my own modperl directory, it displays as plain text, despite making the .pl file executable, etc.
Did you also add .pl to the 'AddHandler cgi-script' section in your httpd.conf? Curious how this could work. I've tried 'AddHandler perl-script .pl' in addition to the directory 'SetHandler perl-script', but nothing.
ai-danno
06-23-2008, 09:11 PM
I didn't add that personally... perhaps the pkg_add installation script did...
since doing that I installed Mason, which promptly broke the script that was executing above... lol. I can take a look when I get home (server at home) to see if that was, in fact, added to httpd.conf.
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.