HostOnNet Blog

Making Perl Script Run from Any Folder

Looking for Linux Server Admin or WordPress Expert? We can help.

In Apache web server, by default perl script run from cgi-bin folder only.
cgi-bin is a special directory that is spefified in httpd.conf
ScriptAlias /cgi-bin/ “/home/cgi-bin/”
In this cgi-bin you can run any scripts, perl or even binary executables.
In cpanel servers, you can run Perl script with .pl or .cgi file extension from any folder. This is a great feature as you can run perl scripts from any folder.
To make your web server run perl script from any folder, add following line to your httpd.conf file and restart the webserver.
AddHandler cgi-script .cgi .pl

Posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.