How to use CGI with Linux hosting accounts
Posted by - NA - on 20 October 2005 08:21 PM

Note: To use CGI (Common Gateway Interface) you should have enabled this at the time of ordering, or later through the 'Upgrade Centre', 'Add Application'. Alternatively drop a line to us at and we can do it for you. You should also consider 'Perl' and SSI (server-side includes).

Step 1: You should upload your cgi files to /cgi-bin and then access them through

Step 2: Once your files are in place, it is imperative that you ensure the correct access permissions are in place.

  1. Do this by logging on to your hosting account and clicking on the "File Manger" icon.
  2. Select your cgi-bin folder
  3. click on the drop down button and Click on Change Permissions


Step 3: Change the permissions to the following.


Step 4: You can then access this test by using a web browser and viewing it as follows:


Note: You can use the script below to test your cgi scripts.

#! /usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><body><h1>Hello World!";
print "</h1></body></html>\n";

Create a new document under cgi-bin. Now copy and paste this script in this document. Make sure you have assigned it the right permission as mentioned above. Also make sure CGI and Perl Support is enable.


(502 vote(s))
Not helpful