How do I configure Apache to use ActivePerl for CGI?
To configure appache to use ActivePerl for CGI:
# DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "C:/apacheroot"
Options FollowSymLinks AllowOverride None
on the Option line, add "ExecCGI":
Options FollowSymLinks ExecCGI
#AddHandler cgi-script .cgi
Remove the '#' at the beginning to uncomment this line.
AddHandler cgi-script .cgi
If you want to use the .pl extension for your CGI scripts, change the extension
so that the line looks like this:
AddHandler cgi-script .pl
Save and close httpd.conf.
http://localhost/test.pl in your browser.
The test script:
#!c:\perl\bin\perl.exe
# ^^^ this must be the first line of the script! ^^^
# start code
use strict;
use CGI;
my $q = new CGI;
# print header and start the markup output
print $q->header( "text/html" ),$q->start_html( "hello from perl cgi!" );
print $q->h2("Hello World!");
print $q->end_html;
# end code
How does one use Apache/mod_perl on Linux with ActiveState?
I use a number of applications, such as RT and Bricologe, that utilize mod_perl. Is there a way to configure Apache to utilize ActivePerl instead of the already installed Perl that comes with the distro?