I ported over a few cgi programs after Ubuntu and Apache2 were installed on my system. But one of the cgi programs that I tested did NOT work. Here it is: Script started on Thu 31 Aug 2006 10:13:03 PM EDT carmaux:/usr/lib/cgi-bin$ cat hello.csh #!/bin/csh # # A simple cgi program - Michael Weeks echo Content-type: text/html echo echo "hello.csh " echo "

" echo Hello. echo "
" carmaux:/usr/lib/cgi-bin$ It looks normal, right? But the browser output is: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.0.55 (Ubuntu) Server at carmaux.cs.gsu.edu Port 80 So I looked at the server log (I removed the non-relevant lines): carmaux:/usr/lib/cgi-bin$ tail /var/log/apache2/error.log [Thu Aug 31 22:13:17 2006] [error] [client 68.215.158.252] malformed header from script. Bad header=hello.csh</: hello.csh I figured that the blank line was not being printed, after reading: http://www.washington.edu/webinfo/case/debug/common.html So I added the two double quotes to make the second 'echo' work, i.e.: echo "" By the way, echo " " would NOT work, as the space means that it's not a blank line. See the corrected program below. carmaux:/usr/lib/cgi-bin$ cat hello.csh #!/bin/csh # # A simple cgi program - Michael Weeks echo Content-type: text/html echo "" echo "<HTML><HEAD><TITLE>hello.csh " echo "

" echo Hello. echo "
" The browser now outputs: Hello. carmaux:/usr/lib/cgi-bin$ exit Script done on Thu 31 Aug 2006 10:17:55 PM EDT -- Michael Weeks, copyright 2006, 2009