Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
A Web Server is a program that, using the client/server model and the World Wide Web's Hypertext Transfer Protocol ( HTTP ), serves the files that form Web pages to Web users (whose computers contain HTTP clients that forward their requests).

I want to create a small Web Server project, So that I can have a basic understanding of how a web server works. Please guide me what tools are required. Programming languages that I'm comfortable with

C/C++
Python
C#.Net
ASP.Net
Posted

No server will be "simple" to program

Understanding the basics of a server.
1. You have a network (private or the internet).
2. Devices (smartphone, pc, etc) connect to the network and are assigned an IP Address.
3. The IP Address shall be unique within the network.
4. All devices, if connected to a network, can exchange data within such network, but only on request.
5. A server is any device in the network that has the software to stay "open" for requests.
6. Usually, this software will have a UDP/TCP protocols listener, and will trigger actions and then transmission of data to the client that asked for something.

All servers follow these simple principles, whether they are Web, FTP, SMTP or any kind of server, the difference is "what do they transmit to the clients".

7. Any device can have more than one server (some mail, some ftp, some web). The kind of service is "ruled" by the port number the "request" bares.

Here's an article:
Build Your Own Web Server[^]
 
Share this answer
 
Homero already gave you all correct directions, for a simple implementation ready to use you can consider CivetWeb[^], a simple lightweight web server.
 
Share this answer
 
v2
Even if you were going to recreate the wheel, I always find it easier to take apart something that works. I have some friends that have incorporated this into their projects in the past and were very happy with it: http://code.google.com/p/mongoose/[^]

good luck man
 
Share this answer
 
Comments
Frankie-C 17-Mar-15 12:41pm    
Nice piece of code. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900