Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • Last Modified:

mod_perl problem

i am trying to setup mod perl on my devlopment server...

i tried following to configuration on my linux box

httpd2 with mod_perl_1.99(latest)

apache1.3.27 with mod_perl_1

and when i run my test script(test.pl) ,the script simply displays content of file (as text file).

any help ?

Lk
0
lokeshv
Asked:
lokeshv
  • 3
  • 2
1 Solution
 
toschCommented:
you have to configure your server to use mod_perl ;).

the lines for httpd.conf look somewhat like this:

LoadModule perl_module /usr/lib/apache/libperl.so
AddModule mod_perl.c

<Location /perl>
   SetHandler perl-script
   PerlHandler Apache::Registry
   PerlSendHeader On
</Location>

0
 
lokeshvAuthor Commented:
this is for version 2 or 1 ?
0
 
toschCommented:
for both, i think.

my web server (where this piece of httpd.conf is from) is still running apache 1.3 (i'll update it soon - i don't expect to have to change these lines ;).
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
lokeshvAuthor Commented:
when i add line LoadModule i get warning msg perl module is already loaded...

and the result is still same ...dispalyes the code..


0
 
toschCommented:
ok, then the LoadModule line is already in yout config.


<VirtualHost www.mydomain.com>

  [...]

  Alias /perl/ /web/www.mydomain.com/perl/
  <Location /perl/>
     SetHandler perl-script
     PerlHandler Apache::Registry
     PerlSendHeader On
  </Location>

  [...]

</VirtualHost>

this causes scripts in the directory /web/www.mydomain.com/perl/ to be accessible at http://www.mydomain.com/perl/[scriptname.pl]

or if you don't use VirtualHosts just put it in the scope of the default web site.
0
 
jmcgOwnerCommented:
Nothing has happened on this question in over 7 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by tosch.

Please post any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now