How to Enable and Run CGI Scripts in Plesk Windows Hosting
When you want CGI or Perl scripts to run on your Windows hosting account. This article explains how to enable and run CGI scripts in Plesk.
You might come across issues like the CGI scripts not working in our windows shared hosting environment. You can refer to the steps mentioned below to know more about running CGI scripts in our Windows - Plesk environment.
-
We need to ensure Perl-CGI is installed on the server and can be enabled for the accounts in all our Shared Windows hosting servers.
-
Now go to Plesk panel >> Websites and Domains >> Hosting Settings.
-
Enable the options "CGI support" and "Perl support"

-
As soon as you enable the option "CGI support " you will be able to see the folder "cgi-bin" in your root directory as follows:
D:\INETPUB\VHOSTS\primary-domain.tld\cgi-bin
-
You will have to add your CGI scripts here. A sample hello world CGI script would be as follows
#!/usr/bin/perl print("Content-type: text/plain\n"); print("\n"); print("Hello World!\n"); -
Once CGI scripts are added, you need to give full control of the CGI script for the application pool user.

-
All is done. Now you should be able to execute the CGI script using the URL:
http(s)://domain-name.tld/cgi-bin/cgi-script.cgi