In order to browse perl files (.pl) through apache serer you need to add few lines in apache configuration file ( httpd.conf)
Add the following in httpd.conf
AddHandler cgi-script .cgi .pl
Now find the following section
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
Add +ExecCGI to the options list. So it looks like as follows now
Now find the following section
<Directory />
Options FollowSymLinks +ExecCGI
AllowOverride None
</Directory>
Now save httpd.conf and restart Apache server
Create a sample perl file called test.pl and add the following lines and save it.
#!/usr/bin/perl
print “content-type: text/html \n\n”;
print “Hello, Perl!”;
Now browse the page




March 19th, 2010
Aneesh
Posted in 
