You are on page 1of 3

Download XAMPP from http://www.apachefriends.org/en/xampp-windows.

html Install it in C drive (C:\xampp) Open apache folder installed in xampp (C:\xampp\apache) Open httpd conf file from C:\xampp\apache\conf Make sure Your script alias must be ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/" in that config file Make sure Your DocumentRoot must be <Directory "C:/xampp/htdocs"> Now make the following changes. Search for #To use CGI scripts outside of ScriptAliased directories: Add one line AddHandler cgi-script .cgi .pl blow the line #AddHandler cgi-script .cgi .pl .asp After making changes in config file save it. Restart the computer. Put your cgi code in C:\xampp\htdocs Now start the XMPP.How? From start menu start the xampp control panel. (look image below)

in that config file

After click on the XAMPP control panel control panel window appear (see image below)

Run the apache & mysql services. Then minimize it.Then Open any browser type htto://localhost/hello.cgi

Here is the Working code. #!c:\perl\bin\perl.exe print"Content-type:text/html \n\n"; print"<html>\n"; print"<h1>Hello World</h1>\n"; print"</html>\n";

You might also like