Installing Perl II
Look for the following line on your Apache Web Server's httpd.conf file -
# To use CGI scripts: # AddHandler cgi-script .cgi AddHandler cgi-script .pl
and add that last line if your scripts are also in .pl extensions.
Next, look for this next line in the same file:
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"
plus the next 11 lines... until and including,
</Directory>
and change that to something like:
ScriptAlias /cgi-bin/ "/home/jdesilva/public_html/cgi-bin/" <Directory "/home/jdesilva/public_html/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory>
Finally, if you want to be able to (and your live webserver allows you to) run cgi scripts from anywhere and NOT only in your cgi-bin, then you have to add this also to your httpd.conf file:
Look for the following lines -
# This should be changed to whatever you set DocumentRoot to.
then in the next few lines where it says,
Options Indexes FollowSymLinks MultiViews
add ExecCGI to it like this:
Options Indexes FollowSymLinks ExecCGI MultiViews
Now any perl script (not only the ones in cgi-bin directory) will run from anywhere on your website.
I hope this covers everything for you to set up your web server on your home or office PC. I know it helped me solve a lot of problems by allowing me to test my web pages and scripts BEFORE uploading them to my webserver.
Besides it's EASY... and before I forget, make sure that the following line is the first line of any perl script you plan to run, otherwise you may get couldn't spawn child process; errors in your Apache error log file.
#!/usr/bin/perl
