Common Gateway Interface (CGI) is a standard way for web servers to interface with executable programs. If your application makes use of it, then you can enable CGI script execution by completing the following steps.
Enable CGI Scripts Execution on Your Cloudways Server
Step 1: Launch SSH terminal from Your Cloudways Console
SSH Terminal is available in the Master Credentials section under the Server Management area.
Step 2: Edit Your .htaccess File
Now edit your .htaccess file as shown in the figure below.
Use vim .htaccess command
Now press i to start editing. Copy and paste the following code in your .htaccess file.
AddHandler cgi-script .cgi .pl
To save the changes, press Esc then :wq and then press Enter. It is now complete, and you can test your script.
Before executing the script, ensure that it has execution privileges. If you have not provided it yet, then use the code mentioned below.
chmod 775 scriptname