headermask image

header image

What is a webserver? Clear your myths…

Most of you must have heard about something called webserver. To most of the people it more of a mystery. Actually a webserver is nothing magical piece of software, but its really marvelous. There are many webservers available, many of them are frequently heard- Apache-the leading webserver which serves 70% of the website, Microsoft IIS-a competitor to Apache, lighttpd- a very light-weight webserver used in routers. The list goes on, but all of them have something in common. Let’s discuss on it.
A webserver is a piece of software which acts as a service and keeps listening on port 80 for any incoming connections. Whenever we try to open a website, our web browser tried to make a connection on port 80 on the server. This connection is accepted by the webserver and its now its duty to serve the client as per the needs. This is a classic example of client-server model.
The work of a webserver is not just accepting and serving data. It has also the task of executing the scripts, it acts as platform for all dynamic web page creation. If you are learning PHP or ASP/ASP.NET you might have used any webserver to run your scripts.

The quality of a webserver depends on how many connections it can handle at any time. Some sites like google and yahoo have millions of people accessing it at a specific instant. If the webserver cannot cope with so many connections and crashes, this situation is more commonly called as “Server Down”. A webserver should be robust so that it can take up all heavy traffic loads, it should even have minimum downtime or in other words- If you restart the server following some changes to its configurations, it should restart immediately otherwise many users may find their page time out after waiting for long.

Let us now have a look at the world’s most famous and reliable webserver- Apache. It is an Open Source and Free software. It is a flagship product of Apache Software Foundation (ASF). At the beginning Apache was started as a small web server, as it grew up it began taking more Open Source Projects. Since now the load has became so much Apache Serve Foundation was formed to coordinate the activities. Other famous softwares under ASF are Apache Tomcat (for running Java Servelets), Apache Ant (tool for automating software build) and Lenya (Content Management System). We shall now restrict ourself to Apache HTTP Server which is more commonly called Apache Webserver.

Apache’s latest version is 2.2.6 . At present 2.2.4 version is more widespread but installing the latest stable version is always recommended. If you want to test Apache you can get a development or Beta version, but for development work always use a stable version. You can get Apache from http://httpd.apache.org/ Installation on windows is a Next>Next> process. Installing on Linux is far easier, use you package manager to get the package. The package name is usually apache2 on most of the linux distros.

One more point! Bare installation of Apache wont open more than static HTML pages. If you want to use it properly, you need a proper dynamic programming language like PHP, Python, Ruby etc. These languages can be integrated with Apache closely. Speaking frankly, PHP delivers best performance on Apache.

There are many rivals of Apache like Microsoft’s IIS which is giving it a tough competition. Even under this scenario Apache does not hide its weakness if any. Bugs found if any are put up on the public bug tracker which everyone can check. This methodology instills a sense of confidence in people who use Apache for commercial and production purposes. Apache is a community project, its not only the core developers but even the volunteers who find bugs and fix them due to public bug tracker. Summing all, it is a great example of how people can cooperate to create the best technology and software.

If you liked my post, feel free to subscribe to my rss feeds

17 Comments so far (Add 1 more)

  1. hey lets see what we can do when we get back
    @ abhinit if we suceed i am planning to setup local repo’s for Fedora and Ubuntu, i will cover the 8th block will you be interested in covering the 5th block??? and if we get access we might put it on the WiFi network, tell me if you are interested ok

    1. Ankur on December 29th, 2007 at 3:45 pm
  2. I dont have much idea on vista firewall, is it better than that provided by Win XP? I hope file sharing on Linux may be easier. Maybe by NFS, havnt tried Linux to Linux sharing coz no comp on my router uses Linux

    2. Manish Sinha on December 29th, 2007 at 9:14 am
  3. @ankur:

    on I-ON too file sharing must be there. u r ryt abt the firewall thing. many have not edited there public folder sharing options too , mayb thts the coz…

    3. abhinit on December 26th, 2007 at 1:07 am
  4. as far as files sharin is concerned… dnt hav n idea abt I-ON but its possible on tata indicom…hav tried it. but m not sure abt static IP’s thr…coz v login everytime v need to use it…so the sessionis temporary…i guess the IP must be dynamic here…

    4. abhinit on December 26th, 2007 at 1:04 am
  5. well file sharing is not there but i think its because most people have vista firewall on and have not changed there settings, i had a NFS share on my comp and some other Linux user were able to see it but then i discovered it near the sessionals so was not able to try it fully

    5. Ankur on December 24th, 2007 at 1:59 pm
  6. @ Ankur and Abhinit
    Are you able to share files over the I-On WiFi? You people should have static IP’s as the wired internet connection of the college too has static IP’s.

    I have tried my system as a server hosting a small site over apache.
    All other computers connected to that router were able to access that site. We used LAN IP’s instead of hostnames.

    We can use site domains but there is a small trick. You need to append the domain-to-IP mapping in your hosts file.
    Under linux this file is located at /etc/hosts and under windows it is at C:\windows\system32\drivers\hosts

    6. Manish Sinha on December 24th, 2007 at 1:42 pm
  7. @manish i think you are telling exactly how we learned all we know
    @abhinit well i know what you are thinking, i have tried that, well i hosted Gnupm3d on my comp but was not able to access it on I-ON WiFi, but will try again coz if this works out we can have a local LAN repository for Fedora and Ubuntu.
    and well all IPs on I-ON are static coz i think they have binded IPs with MAC address, i always had the same IP address there

    7. Ankur on December 24th, 2007 at 1:10 pm
  8. Unless you experiment, you cant screw off your system. Unless you screw off your system you cant fix them. Unless you fix your system you wont learn the core concepts.

    There is lots of things to learn in this Open Source world. Just go on experimenting… :)

    8. Manish Sinha on December 23rd, 2007 at 2:07 pm
  9. m gettin ideas….!…m surely gonna mess up with my connection nd wifi once m in coll!…[;)]

    9. abhinit on December 23rd, 2007 at 1:42 pm
  10. thats great discussion going around here guys thanks Manish for posting on Apache i will do my posting work on MoinMoin soon. Actually if you guys are free to try something then try Globule Software please its link is http://www.globule.org/ you will get all information there.

    10. shubhendra on December 23rd, 2007 at 1:06 pm
  11. I think the wi-fi connection you have has got a static IP, but this is not sufficient, you also need access to the router in this case for port forwarding. You need to forward port 80 in the router to your IP address,if you got a static IP address on the wi-fi LAN.
    As I said above, for internal network you dont need a static IP of the external network. For accessing the server remotely, say in US, you need a external static IP, and port 80 should be forwarded from the router to your computer.

    11. Manish Sinha on December 23rd, 2007 at 8:10 am
  12. oh k… means if u hav a static IP and a webserver software then u can use ur comp as a server which can be used to host websites nd other web contents. what abt if we have wi fi, as in our coll??… what abt the IP in this case?…

    12. abhinit on December 23rd, 2007 at 7:44 am
  13. @Abhinit
    You can host a website on your LAN. You just have to make apache listen to external connection requests. Hope you have a static LAN IP address. For viewing it all over the globe you need to have a static IP address so that you can configure your DNS accordingly otherwise updating it every time is very tedious.

    13. Manish Sinha on December 23rd, 2007 at 2:40 am
  14. thanks u all :)

    14. Abhinit on December 23rd, 2007 at 1:07 am
  15. actually there is a service no-ip.com It allows you to have your own server even if you don’t have a static IP.

    If you are running apache http server, php is included as an official module so that in fact leads to faster execution of the code when compared to the scenario of using php as a standalone binary on other http daemons that don’t allow it to be integrated into the web server.

    15. anomit on December 23rd, 2007 at 12:27 am
  16. well you can host websites on your computer but if you are talking about Dataone or Airtel’s ADSL there you dont have a static IP in that so that wont work
    but if you have a static IP then you surely can you will just have to configure the DNS servers

    16. Ankur on December 22nd, 2007 at 4:19 pm
  17. by installin apache on our system??… is it possible that people can host websites on our computer, if its on 24/7??… and if so, than wht abt domain names??…will it have to be bought separatey??

    17. Abhinit on December 22nd, 2007 at 2:04 pm

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*