configure perl in apache

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

You can leave a response, or trackback from your own site.

Leave a Reply

Subscribe without commenting


Fatal error: Call to undefined function wp_list_addonn() in /home/sites/customers/aneesh/systemadmin/blog/wp-content/themes/Grante/sidebar.php on line 106