Perl/CGI Settings in Windows Server 2003

Assumptions:

Operating system running Windows Server 2003 with IIS 6.0 and installed ActiveState ActivePerl (if you wanted to download setup so visit at http://www.activestate.com). 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.

clip_image002

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

clip_image002[4]

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.

clip_image001

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

clip_image001[4]

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

clip_image002[6]

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

clip_image001[6]

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

clip_image002[8]
Click on Finish to complete the virtual directory wizard.

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

clip_image002[10]

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

clip_image001[8]

Note:
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