I'd also recommend xitami as a simple web server for testing cgi. It's less than a meg to download. It comes almost completely setup for quick and simple operation with cgi-bin directory all set up and ready to go.
You can get it off
download.com
Just do a search for Xitami. Very handy.