Here are some examples of setting up an embedded web server.
Configuration
We recommend that you put your documents and scripts in separate directories.
Script
Here are two examples of a simple CGI script that displays a randomly selected image on a web page. The same script is presented here in C and perl, so that you can see how to implement scripts in either language.