Thursday, May 29, 2008

What is Apache and How it serving the webpage?

What is Apache :

Apache is a free, open-source web server software system that is pervasive on UNIX, Linux, and similar operating system types. It is also available for Windows and other operating systems.

Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Some common language interfaces support mod_perl, mod_python, Tcl, and PHP. Popular authentication modules include mod_access, mod_auth, and mod_digest. A sample of other features include SSL and TLS support (mod_ssl), a proxy module, a useful URL rewriter (also known as a rewrite engine, implemented under mod_rewrite), custom log files (mod_log_config), and filtering support (mod_include and mod_ext_filter).

Popular compression methods on Apache include the external extension module, mod_gzip, implemented to help with reduction of the size (weight) of web pages served over HTTP. Web-based blogging software such as WordPress, which run on Apache, are capable of allowing pages served to be reduced greatly in size through implementations of mod_gzip coupled with PHP, with the help of PHP’s gzdeflate and/or other methods.

How does the Apache serving the webpage:

When you connect to the URL of someone’s home page — say the notional we shall meet later on — you send a message across the Internet to the machine at that address. That machine, you hope, is up and running, its Internet connection is working, and it is ready to receive and act on your message.

URL stands for Universal Resource Locator. A URL such as comes in three parts:


So, in our example, <> is http, meaning that the browser should use HTTP (Hypertext Transfer Protocol); is; and is “/ “, meaning the top directory of the host. Using HTTP/1.1, your browser might send the following request:

GET / HTTP/1.1

The request arrives at port 80 (the default HTTP port) on the host The message is again in three parts: a method (an HTTP method, not a URL method), that in this case is GET, but could equally be PUT, POST, DELETE, or CONNECT; the Uniform Resource Identifier (URI) “/”; and the version of the protocol we are using. It is then up to the web server running on that host to make something of this message.

It is worth saying here — and we will say it again — that the whole business of a web server is to translate a URL either into a filename, and then send that file back over the Internet, or into a program name, and then run that program and send its output back. That is the meat of what it does: all the rest is trimming.

The host machine may be a whole cluster of hypercomputers costing an oil sheik’s ransom, or a humble PC. In either case, it had better be running a web server, a program that listens to the network and accepts and acts on this sort of message.

No comments: