IIS

Map CGI Extension in IIS

Question: 

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

Answer: 

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.

Manually creating IIS script mappings

Question: 

How can I manually create IIS script mappings for ActivePerl?

Answer: 

To manually create IIS script mappings for ActivePerl:

  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 to a different directory )
  • for the extension, put in 'pl'
  • for Verbs, select 'Limit to:' and put in 'GET,HEAD,POST'
  • select 'Script Engine' and 'Check that file exists'

For PerlIs ISAPI support, repeat these step using
'C:\Perl\bin\perlis.dll' for the executable field and
'plx' for the extension.