How to run your CGI program
Our web server www.fed.cuhk.edu.hk allows end user to make use of their own CGI program in order to enhance the homepage. To install your own CGI programs, please follow the listed step below.
Assuming your user information are
Step 1: Make your homepage and CGI directory
$ cd ~
$ mkdir public_html
$ mkdir public_html/cgi-bin
(The directory name is fixed.)
Step 2: Copy your CGI programs to the ~/public_html/cgi-bin directory.
$ cp <filename>.cgi ~/public_html/cgi-bin/<filename>.cgi
$ chmod 755 ~/public_html/cgi-bin/<filename>.cgi
(Please note that your program must use the .cgi as the file extension.)
Step 3: Make the linkage to the CGI program in your HTML file.
http://www.fed.cuhk.edu.hk/cgi-bin/cgiwrap/joe/<filename>.cgi
If you want to see debugging output from your CGI progam, make use of the following link
http://www.fed.cuhk.edu.hk/cgi-bin/cgiwrap/joe/<filename>.cgi
Our Suggestion
Although our server enable the user CGI function, however, it is NOT recommended to make use of your own CGI if you are not familiar with the Unix platform and CGI program. It is because bad CGI program create security holes to the system and allow intruders/hackers to read/modify/remove your valuable data in your own account. Therefore, you should try your best to make use of standard CGI programs in our server or ensure your CGI program is good enough to stop any illegal input.
Thank you for cooperation.