Perl/CGI Settings in Windows Server 2003


Operating system running Windows Server 2003 with IIS 6.0 and installed ActiveState ActivePerl (if you wanted to download setup so visit at After download run the setup and select path like (C:\Perl) and UPDATE: ActivePerl 5.8.2 Build 808 and higher should add the Web Service Extensions during install.

Step-by-Step Configuration

Step 1:
Click on Start, then Programs, then Load IIS  from Administrative tools and clicking on IIS Manager.


Step 2:
Click on “Web Service Extensions”, then in left side panel click on “Add a new Web service extension” link.


Step 3:
In extension name give any name which is you want, like “CGI script” and click on Add button and give path like (C:\Perl\bin\perl.exe “%s” %s) and click OK.


And also select, click “Set status to allowed” and click ok.


Step 4:
Now, click on Start, then click on Run, then type cmd to load command prompt and type “md c:\inetpub\cgi-bin”


Step 5:
To create virtual directory, Right click on Default Web Site and goto “New” and click on “Virtual Directory”.


Click on next at first dialog of wizard start, then in alias put “cgi-bin” and then click on next then in path input box put “c:\inetpub\cgi-bin”.
On next dialog box Leave default checked which is selected, like (Read, Run scripts and execute and then click on next

Click on Finish to complete the virtual directory wizard.

Step 6:
Right-click on virtual directory cgi-bin and click on properties.


Step 7:
Click on Configuration button in lower right-hand area and make sure .pl is there and then ok.


After adding Perl in IIS 6.0 you can make scripts work but shebang line (#!/usr/bin/perl) now you replace with this #!C:\Perl\bin\perl.exe . All references files are in  c:/home/user or c:\\home\\users.

Be Sociable, Share!

Leave a Reply