LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 05-18-2007, 07:53 PM   #1
jaepi
Member
 
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, 01:32 AM   #2
milindlokde
Member
 
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:
http://www.openroad.org/cgihelp/cgi.html
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 01:40 AM.
 
Old 05-19-2007, 02:37 AM   #3
nc3b
Member
 
Registered: Aug 2005
Posts: 330

Rep: Reputation: 32
I really don't know what to say about cgi programming, but here is a link. http://beej.us/guide/bgnet/

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, 02:47 AM   #4
jaepi
Member
 
Registered: Apr 2007
Location: Urban Jungle
Distribution: Ubuntu
Posts: 189

Original Poster
Blog Entries: 1

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

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Hi

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)

http://www.melikyan.com/ptypes/

It's opensource, and as an example program, a web-server is included. Maybe take a look?
 
Old 05-19-2007, 11:09 AM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
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 http://www.acme.com/software/thttpd/. 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 http://www.w3.org/Protocols/HTTP/HTTP2.html. 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.
 
  


Reply



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 02:25 AM
difference between web server and application server gokulnath Linux - Server 2 05-07-2007 07:26 AM
Quitting an Application over the Web in Linux. Yosakita Linux - General 1 02-19-2005 03:03 PM
GIS Application Needed for Linux Web Server Sybrwulf Linux - Software 0 11-17-2004 06:27 AM
web server application HTS Programming 1 06-10-2004 09:48 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:55 PM.

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