Apache is a powerful and flexible HTTP/1.1 compliant web server. Originally designed as a replacement for the NCSA HTTP Server, it has grown to be the most popular web server on the Internet. As a project of the Apache Software Foundation, the developers aim to collaboratively develop and maintain a robust, commercial-grade, standards-based server with freely available source code.

The Apache HTTP Server is distributed at no charge for commercial or non-commercial use. For more information read the LICENSE.txt file.

Apache can be used with Microsoft Windows. The Apache HTTP Server Version 2.0 runs under Windows NT, Windows 2000 and Windows XP. You should download the version of Apache for Windows with the .msi extension. This is a single Microsoft Installer file containing Apache, ready to install and run.

The latest Apache HTTP Server version can be downloaded from: http://httpd.apache.org/
The latest Apache 1.3 documentation can be found at: http://httpd.apache.org/docs/1.3/
The latest Apache 2.0 documentation can be found at: http://httpd.apache.org/docs/2.0/
The latest Apache 2.2 documentation can be found at: http://httpd.apache.org/docs/2.2/

Setup CGI on Windows environment


Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Apache 2.0.47 or higher
ActivePerl 5.8.x
mod_perl 2.0 package

  1. Verify if the following files exists:
    • C:\Tools\Apache Group\Apache2\modules\mod_perl.so
    • C:\Perl\bin\perl58.dll

    If not, follow the procedure as mentioned in guides:
  2. Edit httpd.conf file. Add the following lines (in red):

    LoadFile "C:/Perl/bin/perl58.dll"
    LoadModule perl_module modules/mod_perl.so
       ServerAdmin [email protected]
       DocumentRoot c:/mobilefish_web
       ServerName www.mobilefish.com
       ErrorLog logs/www.mobilefish.com-error_log
       #TransferLog logs/www.mobilefish.com-access_log
       CustomLog "|c:/weblogs/rotatelogs.exe
          c:/weblogs/www.mobilefish.com-access_%y%m%d.log 86400" combined
       <Directory "c:/mobilefish_web">
          Options +Includes
          AddType text/html shtm
          AddOutputFilter Includes shtm
          AllowOverride All
       Alias /cgi-bin/ "C:/mobilefish_web/cgi-bin/"
       <Location /cgi-bin>
          SetHandler perl-script
          PerlResponseHandler ModPerl::Registry
          PerlOptions +ParseHeaders
          Options +ExecCGI

    View the updated httpd.conf file.

  3. Restart Apache server.

  4. Create in your docroot the following directory:


  5. Create a test script named hello.pl and enter the following code:

    print "Content-type: text/html\n\n";
    print "Hello, World.";

  6. Place file hello.pl into directory <docroot>/cgi-bin/

  7. Execute this script:


  8. You should see, "Hello, World." If not, see your Apache error log file.