Configuring Perl on IIS 7.0
I, too was stumped by this and could find nothing useful on the net - so figured it out by trial and error and by poring through pages of info on the internet.
- Make sure that you have installed Perl and that it is in your path command as per instructions elsewhere on ActiveState (c:\Perl is where I have it.)
. - Make sure that Perl is working by creating a little perl script and running it. Here is one that should work:#!/usr/bin/perl
print "Hello world!\n\n";
print "Press the Enter key to exit.\n";
<>; #pause - Make sure that you Install IIS 7.0 with:
Web Management Tools = IIS Management Console
World Wide Web Services = CGI - Once you have IIS running properly, go to http://localhost to check. You should get a default web page.
. - Next, go into Control Panel
= Administrative Tools
= Computer Management (Local)
= Internet Information Services (IIS) Manager
= Default Web Site (or Default Web Site == cgi-bin if you set it up that way)
= Handler Mappings
= Add Script Map (once for CGI and again for Perl as per 6. and 7.) - For CGI:
Request path: *.cgi
Executable: c:\Perl\bin\perl.exe "%s" %s
Name: Perl Script Map
Press 'OK'
Say 'NO' to ISAPI message - For Perl:
Request path: *.pl
Executable: c:\Perl\bin\perl.exe "%s" %s
Name: CGI Script Map
Press 'OK'
Say 'No' to ISAPI message - Restart IIS
Control Panel
= Administrative Tools
= Services
= World Wide Web Publishing
= Restart the Service) - Run a script that you know works. Don't do anything different until you are sure that IIS is running as expected.
Comments
Post a Comment