Install CGI/Perl with Appser/Apache on Windows

This is a note for the CGI/Perl installation and Apache environment configuration on Microsoft Windows.

In order to run CGI normally, you need:

1. Install ActivePer (New version is better)
2. Modify httpd.conf in C:AppServApache2.2conf

where you need to modify two options,

a. The path of the installed ActivePerl which should be different with the original configuration.
# the C:Program FilesPerl directory, the shebang line should be:


b. The script support. You need to add two lines in following section:

<IfModule mime_module>
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
--The two lines in the following
AddHandler cgi-script .cgi
AddHandler cgi-script .pl

After these two modification, restart the Apache Service. Then the cgi should work.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s