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.
  1. 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.)
    .
  2. 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
  3. Make sure that you Install IIS 7.0 with:
    Web Management Tools = IIS Management Console
    World Wide Web Services = CGI
  4. Once you have IIS running properly, go to http://localhost to check. You should get a default web page.
    .
  5. 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.)
  6. For CGI:
    Request path: *.cgi
    Executable: c:\Perl\bin\perl.exe "%s" %s
    Name: Perl Script Map
    Press 'OK'
    Say 'NO' to ISAPI message
  7. For Perl:
    Request path: *.pl
    Executable: c:\Perl\bin\perl.exe "%s" %s
    Name: CGI Script Map
    Press 'OK'
    Say 'No' to ISAPI message
  8. Restart IIS
    Control Panel
    = Administrative Tools
    = Services
    = World Wide Web Publishing
    = Restart the Service)
  9. Run a script that you know works. Don't do anything different until you are sure that IIS is running as expected.

Comments