How to check Perl support for a particular domain?

Created:

2017-04-12 09:38:45 UTC

Modified:

2017-08-08 13:45:08 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to check Perl support for a particular domain?

Applicable to:

  • Plesk for Linux

Question

How to check Perl support for a particular domain?

Answer

1. Create a script and set proper file permissions and ownership:

[root@server]# which perl
/bin/perl
[root@server]# cat /var/www/vhosts/example.com/httpdocs/schedule/test.pl
#!/bin/perl
print "Content-type: text/html\n\n";
print "Testing";


# chmod 755 /var/www/vhosts/example.com/httpdocs/schedule/test.pl
# chown pt-user:psacln /var/www/vhosts/example.com/httpdocs/schedule/


2. Enable Perl support in Plesk > Subscriptions > example.com > Hosting Settings

3. Check SELinux status. If it is enabled, set proper context to it:

[root@server]# getenforce

# Enabled

# semanage fcontext -a -t httpd_sys_script_exec_t "/var/www/vhosts/example.com/httpdocs/schedule(/.*)?"

# restorecon -Rv /var/www/vhosts/example.com/httpdocs/schedule/

4. Open the test page:

# curl http://example.com/schedule/test.pl
Testing

#

Have more questions? Submit a request
Please sign in to leave a comment.