Map CGI Extension in IIS

Posted by troyt on 2006-06-27 10:52
OS: Windows | Product: ActivePerl | tags: CGI IIS

How do I get IIS to use ActivePerl for my CGI scripts?


During installation, ActivePerl creates script mappings in IIS for the .pl and .plx extensions but not the .cgi extension. To support the .cgi file extension, you will need to replicate the .pl extension settings.

  1. Go to Control Panel | Administrative Tools
  2. Open Internet Information Services
  3. Right-click the Default web site and select Properties.
  4. In the Properties dialog-box select the 'home Directory' tab.
  5. Click on the configuration button in the Application Configuration dialog.
  6. Click on the 'Add' button.

In the Add/Edit dialog-box, ensure the following settings are correct:

  • for executable, put in C:\Perl\bin\perl.exe "%s" %s ( adjust this if you have installed Perl elsewere)
  • for the extension, enter 'cgi'
  • for Verbs, select 'Limit to:' and put in 'GET,HEAD,POST'
  • select 'Script Engine' and 'Check that file exists'

Click OK to close all of the open dialog-boxes. You should now be able to place the cgi files you want to run into the wwwroot folder (usually c:\inetpub\wwwroot\), or create a virtual web directory in IIS to the location of your cgi files.