Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-18-2007, 08:53 PM   #1
Registered: Apr 2007
Location: Urban Jungle
Distribution: Ubuntu
Posts: 189
Blog Entries: 1

Rep: Reputation: 30
web server application in linux

hello there, uhhmmm...anyone here could give me an idea or point me a reference on how web server application are created (console based) using c++ and linux as it's environment...i'd be using threading, processes, synchronization and http protocol...

a reference to any website or books would be nice...thank you...
Old 05-19-2007, 02:32 AM   #2
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 121

Rep: Reputation: 21
This might help

You will have to use CGI programming for the purpose.
Here's a link for cgi programming using C:
Other rules regarding CGI programming will apply.

Perl, PHP or Python can be a good idea for webserver programming. Perl can help you with threading, processes, synchronization and http protocol. It is definitely a very versatile and strong programming language both for command line and for web programming.

Last edited by milindlokde; 05-19-2007 at 02:40 AM.
Old 05-19-2007, 03:37 AM   #3
Registered: Aug 2005
Posts: 330

Rep: Reputation: 32
I really don't know what to say about cgi programming, but here is a link.

It is a well known suite of tutorials, and it's quite friendly. But I suggest you also read "Linux Socket Programming By Example" , or "Beginning Linux Programming", or "Linux Programming Unleashed". These are commercial and, although you can find them on emule or whatever, you ought to buy them (really, the printed version of such a book is great!). And there is also a free ebook, "Advanced Linux Programming" and it's quite good. Hope this helps, cheers.
Old 05-19-2007, 03:47 AM   #4
Registered: Apr 2007
Location: Urban Jungle
Distribution: Ubuntu
Posts: 189
Blog Entries: 1

Original Poster
Rep: Reputation: 30
thank you for being so kind...
Old 05-19-2007, 05:59 AM   #5
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,294

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335

Just another suggestion. I once looked into "ptypes". It's a C++ library like STL but it adds a lot of stuff that would be hard to write portable so it works on different platforms. Like how do you do portable multitread locking and networking with STL? (I have no idea)

It's opensource, and as an example program, a web-server is included. Maybe take a look?
Old 05-19-2007, 12:09 PM   #6
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
If you are looking for a small HTTP server that you can embed into your own application, then there are already a few of these out there. For one, go to There are more links from there.
If you want to develop a server from the ground up, get yourself an HTTP (not HTML) reference, such as Also get netcat, if you don't already have it, and use it to see what a browser sends to a server. Use the information at Beej's guide, from above, to start writng code that responds to the requests of a browser. You can easily have an embedded server that performs basic functionality in a couple of hundred lines of code. Probably less.

--- rod.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuration of web based application in linux mobassir Linux - Networking 4 04-23-2009 03:25 AM
difference between web server and application server gokulnath Linux - Server 2 05-07-2007 08:26 AM
Quitting an Application over the Web in Linux. Yosakita Linux - General 1 02-19-2005 04:03 PM
GIS Application Needed for Linux Web Server Sybrwulf Linux - Software 0 11-17-2004 07:27 AM
web server application HTS Programming 1 06-10-2004 10:48 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration