This section describes how to configure IIS (Internet Information Services) Web server to run Perl programs through CGI (Common Gateway Interface).
One of most commonly used areas of Perl language is Web server side application.
If your application is written in Perl, and want to run it through a Web
browser request, you must configure your Web server to be able to run the application.
On a Unix system, this is very easy. But on a Windows system, you need
to do some experiments.
I had Internet Information Services (IIS) 5.0 Web server running on my Windows 2000 system,
and ActivePerl v5.6.1 installed
on c:\perl. Here is what I did to run Perl programs with IIS.
1. Made a new sub directory in the default Web server home directory,
c:\Inetpub\wwwroot\cgi-bin.
2. Copied my hello.pl to that new directory, c:\Inetpub\wwwroot\cgi-bin\hello.pl.
print "Hello world!\n";
3. Ran "Internet Information Services (IIS)", selected "Default Web Site"
under localhost, clicked the stop icon, then clicked the start icon. This
was to restart the IIS server, so the new sub directory and the new Perl program
can be picked up by the server.
4. On IIS, selected the cgi-bin directory, and right mouse clicked to
view the properties window. On the Directory tab, saw Read and Write were
checked, and Execution Permissions had "Script only".
5. Ran Internet Explorer (IE) with http:\\localhost\cgi-bin\hello.pl,
a download windows came up asking me to save hellp.pl. Not too bad,
my cgi-bin sub directory and hello.pl was reachable!
6. On IIS, selected "Default Web Sites", then right mouse clicked to
view the properties window. On the "Home Directory" tab, clicked
the "Configuration" button. Here I had to add a new entry into the
Application Mappings: