How do I run CGI scripts on the Luddy School web server?

Examples

Here are a couple sample scripts that you may want to use to verify that things are working properly. You should be able to just copy these into your cgi-pub directory with a name like test.cgi, make it executable, and have them work.

Sample bash cgi Script

!/bin/sh
echo "Content-type: text/html"
echo ""
echo "hello"

Sample perl cgi Script

#!/usr/bin/perl
print "Content-type: text/html\n\nhello<br>\n";

Guide information

Guide manager: Rob Henderson
Last updated: June 2023