📜 ⬆️ ⬇️

Install Perl on Apache running under Windows.

// publish at the request of the user mikegav

It prompted me to write this article the lack of normal installation documentation in Russian. Moreover, judging by the Internet forums, those who want to try Perl are not small, but for some reason not on one more forum there was no normal answer, how to attach your Windows web server to Perl.

  1. I believe that you already have Apache 2.2.11 installed. If not installed, you can put WAMP www.wampserver.com/en
  2. Downloading ActivePerl-5.8.9.825-MSWin32-x86-288577.msi You need to download this version, not 5.10, because for version 5.10 there is no mod_perl in the repository.
  3. We install mod_perl from the repository, for this we run from the command line: ppm install theoryx5.uwinnipeg.ca/ppms/mod_perl.ppd
  4. During installation, there will be just one question “Where should mod_perl.so be placed? [D: / Apache2 / modules] ”I need to specify the path to the“ modules ”folder (I have D: \ wamp \ bin \ apache \ Apache2.2.11 \ modules \)
  5. After installing mod_perl, we manually configure Apache.
    1. We connect perl, for this purpose after last LoadModule we add:
      #Enable mod_perl
      LoadFile "C:/Perl/bin/perl58.dll"
      LoadModule perl_module modules/mod_perl.so
      PerlResponseHandler ModPerl::Registry
      PerlOptions +ParseHeaders

    2. I don’t like the official recommendation to create a separate directory for perl scripts and hang SetHandler perl-script on it, but to set SetHandler to the root directory of the Web server is not the same comfy. This will kill the php interpreter. I suggest to do as I, associate the extension pl with perl-script. To do this, simply add the line: AddType perl-script .pl. And allow cgi execution in the root directory. To do this, inside the site <Directory "d: / wamp / www /"> add Options + ExecCGI
    3. Well, to an amateur, if you really want to perl scripts to behave like php-shnye lead DirectoryIndex to this type: DirectoryIndex index.pl index.php index.php3 index.html index.htm


')

Source: https://habr.com/ru/post/56065/


All Articles