This has allowed companies that host virtual domains, where many domains live on a single machine, to use one IP address for all of the domains hosted. It turns out that hundreds of domains are hosted on 192.41.1.10 - Gnan's IP address. You can see from this description that a web server can be a pretty simple piece of software. It simply takes the file name passed in with the GET command, retrieves that file and sends it down the wire to the browser. Even if you take all of the code to handle the ports and port connections into account, 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 asking for your name and password, you have encountered a password-protected page. The server lets the owner of the server maintain a list of names and passwords for people who are allowed to access the page, and the server lets only those people who know the proper password to see the page. More advanced servers add 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.