How to check if Perl script is enabled and working for a specific domain in plesk

0
2494

How to check if Perl script is enabled and working for a specific domain in plesk

 

Hello every one ,

Today i will explain how to check if Perl is enabled  in specific domain.

There are two ways to check if the Perl scripting engine is enabled for a domain:

1. Use the default Parallels Plesk Panel domain page content (http://domain.tld/index.html) and then the “Perl” item. The domain name should be resolved locally and the web-content should be the Panel domain default content.

The test is successful if the Perl possibilities test page is shown.

2. Use a simple script like this:

#!/usr/bin/perl
print "content-type:text/htmlnn";
print "<html>n";
print "<head />n";
print "<body>n";
print "Hello World!n";
print "</body>n";
print "</html>n";
#

It is necessary to put the content into a text file and save it in a domain web-accessible folder (like %plesk_vhosts%/domain.tld/httpdocs) on the server with a “.pl” extension (test.pl, for example). Then try to open the file via a browser using the http://domain.tld/test.pl URL. The domain name should be resolved locally.

The test is successful if the page shows the “Hello World!” string. If an error or full script listing is visible, it means that the Perl script engine is not properly configured for the domain.