How a Web Server Works You can see from this description that a Web server can be a pretty simple piece of software. It takes the file name sent in with the GET command, retrieves that file and sends it down the wire to the browser. Even if you take into account all of the code to handle the ports and port connections, you could easily create a C program that implements a simple Web server in less that 500 lines of code.
Most servers add some level of security to the serving process.
For example, if you have ever gone to a Web page and had the browser pop up a dialog box asking for your name and password, you have encountered a password-protected page. More advanced servers add further security to allow an encrypted connection between server and browser, so that sensitive information like credit card numbers can be sent on the Internet. The whois form at Network Solutions allows you to enter a domain name on a form, and the page returned is different depending on the domain name entered. Any search engine lets you enter keywords on an HTML form, and then it dynamically creates a page based on the keywords you enter. It is actually processing information and generating a page based on the specifics of the query.