Go back to fronty page View most popular entries View latest additions Submit tutorials to UnixTutorials.info
UnixTutorials logo

Unix+clones

A web server in a shell script

Post date: March 14, 2006, 08:03 Category: Views: 16470 Comments
Tutorial quote: Suppose you want to experiment a little with web pages and CGI's, but you don't want the hassle of installing the full Apache package. This quick and dirty shell script could just be what you need.

Put simply, a web server is an application that sends local text files over the network to the clients that request them. If you let another program (for example inetd) deal with the network part, the web server could be reduced to a mere cat "$filename" to stdout. Of course, the difficult part would be to extract that filename out of the HTTP request string: nothing that a Bash script cannot easily do!

Comments

Web-based applications and online marketing solutions - LumoLink