• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1203
  • Last Modified:

C++ Web Server - Getting Started

I would like to implement a web server written entirely in C++.  I am told that there are alot of hosting services that use C++ technology.  I need the following info:

(1) the most current, robust, stable technologies that will help me implement such a server
(2)  some examples of hosting services that use C++ technology so I can vailidate (1) with the assumption that there are more C++ hosting services than say Java or .NET

In other words, I need someone to help get me started.
1 Solution
The vast majority of websites run on the Apache web server :


It is open-source, free, and runs on UNIX/Linux as well as Windows systems. And it is written in C. How's that for a reference :)
If you are trying to create a web server in C++, you are reinventing the wheel (unless you want to do that for educational purposes. What you need is

- a good understanding of TCP/IP:

- knowledge of the HTTP protocol:

- a multithreaded model to serve more than one request at a time:

To start out, you might want to take a look at some OSS web servers, e.g. http://sourceforge.net/projects/ehttpd/
If you want to write a server from scratch, it's EASY to do a very basic server, less than 30 lines of code.  

It's very HARD to write a good, reliable, fast, flexible, standards-conforming and de-facto conforming server.  Like at least 9 months of very heavy coding, and debugging, and testing.

On the other hand you could just grab one of the many existing, well-tested servers out there.  Apache would be a good choice.


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now